flat QScrollBar stylesheet
-
i need to make QScrollBar for flat style, without borders, but when i set QScrollBar::add-line or QScrollBar::sub-line it forgot the other properties, for example icon and etc. How can i change only background color and border with save other values in stylesheet?
QScrollBar {
background: #444444;
}QScrollBar::sub-page {
background: #747474;
}QScrollBar::add-page {
background: #747474;
}When added:
QScrollBar::add-line {
border: 1px none;
border-color: #A0A094;
}QScrollBar::sub-line {
border: 1px none;
border-color: #A0A094;
}Why buttons up / down are lost?
-
@Craetor
there might be a high chance that once you set the::add-line
and::sub-line
sub-controls via a stylesheet style, you also need to style the whole sub-control.
Means you wont be able to mix native with stylesheet style for certain (maybe even all?) sub-controls. So you also need to provide the up- and down-arrows as pixmaps and set them via stylesheet.See Customizing QScrollBar as reference