I'm trying to use stylesheets to style my scrollbars as this picture:

My problem is to make the background to be just a line with a width of 1px. One idea is to use a picture as the background (where the picture is just white with a 1px line). But is there another way of doing this?
This is the style I'm using:
border: 0px;
background: #fff;
margin: 0px;
width: 15px;
}
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #D7D7D7, stop: 1.0 #A2A2A2);
min-height: 20px;
border: 1px solid #9F9F9F;
border-radius: 4px;
}
QScrollBar:vertical {
border: 0px;
background: #fff;
margin: 0px;
width: 15px;
}
QScrollBar::handle:vertical {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #D7D7D7, stop: 1.0 #A2A2A2);
min-height: 20px;
border: 1px solid #9F9F9F;
border-radius: 4px;
}
To copy to clipboard, switch view to plain text mode
Bookmarks