Solved scrollbar stylesheet not working in listview ;
-
here is the stylesheet
QWidget{ background-color: #232323; border: 1px rgb(0, 0, 0); padding: 10px 5px 5px 5px; } QScrollBar::groove { background: red; position: absolute; left: 4px; right: 4px; } QScrollBar::handle { background: white; height:10px; } QScrollBar::add-page { background: #172027; } QScrollBar::sub-page{ background: #172027; }
-
Hi,
How are you applying it ?
What version of Qt are you using ?
On what OS ? -
@SGaist
via qt desinger ,
i am in linux,qt 5.10.1 -
What widgets did you use in your custom widget ?
-
@SGaist
it is not a custom widget.
it is a list widget -
There's no evidence of it in your picture since you did some heavy customisation.
Can you show how you are setting it up and apply the stylesheet ?
-
@SGaist
i made that with the qt designer
and also applying the stylesheet by designer. -
@saber
Hi
It does work, but your style might not be complete enough.using bigger sample, it does have effect
please see
http://doc.qt.io/qt-5/stylesheet-examples.html
and Customizing QScrollBar -
this works on my other widget (qscroll area ) .
so i am sure that scroll bar's style sheet is correct . -
@saber
Ok. no idea then.
QScrollbar is QScrollbar no matter who uses it. -
it seems that the stylesheet is conflicts with the parent widget's stylesheet.
i applied the stylesheet through the parent and remove the stylesheet from the listwidget and it is fixed.
thanks.