How to change the handle's height of the qsrcollbar ?
Unsolved
General and Desktop
-
I used the code below.but didnt work.
the handle still higher than 30px. it is related to the qwidget height I ve put. so how to change it?
scrollArea->verticalScrollBar()->setStyleSheet("QScrollBar::handle:vertical{height:30px;}"); -
Try without
:vertical
. From my understanding:vertical
is a pseudo state ofQScrollBar
and not of its handle. I'm not sure how this would work if you really needed both:vertical
and::handle
. But, at least in the example you provided you set the stylesheet on a specific scroll bar. In that case you really don't have to distinguish between vertical and horizontal scroll bars.