1

I have a QListView that I have given a border. The scroll bar when it appears seems to be drawing over top of my border

example scrollbar image

This is most notable at the bottom where there is a dark bar over the border and the inside of the border is not rounded, but also somewhat apparent if you look closely at the top right corner. Is there a way to fix this and if so how would I go about it?

If there is a stylesheet fix that would be preferred. If it needs to be coded I'm writing this UI with python 2.7 using qtpy.

This should be all the relevant qss code I have for the scroll bar:

*{
    color: #c8c8c8;
    background-color: #444444;
}
QQAbstractItemView
{
    border: 2px solid grey rounded;
    border-radius: 5px;
    selection-color: black;
    background-color: #2b2b2b;
    selection-background-color: orange;
}

QScrollBar:vertical
{
   width:  14px;
   margin:  0px;
   border-top-right-radius:    10px;
   border-bottom-right-radius: 10px;
}
QScrollBar::handle:vertical
{
   margin:     2px 2px 2px 2px;
   min-height: 20px;
   background-color:orange;
   border-top-right-radius:    10px;
   border-bottom-right-radius: 10px;
}
QScrollBar:left-arrow:vertical,   QScrollBar::right-arrow:vertical,
QScrollBar::add-page:vertical,    QScrollBar::sub-page:vertical,
QScrollBar::sub-line:vertical,    QScrollBar::add-line:vertical
{
    background: none;
}

This is my first time working with stylesheets so any help would be appreciated.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

0 Answers0