PDA

View Full Version : How to specify only a part of style ? I'd want to set the v size of slider -scrollbar



tonnot
11th October 2011, 11:18
I only want to set :
QScrollBar::handle:vertical { min-height: 30px; }
But it seems it need all QScrollBar definition ?
Any trick ?
Thanks

alexandernst
11th October 2011, 11:42
I'm interested in that too.
Is there something that will let us "overwrite" only certain parts of the style of a QWidget?

Regards

wysota
11th October 2011, 14:55
No, it's either all or none in this situation. However you may doing without using stylesheets. You just need a style proxy and return a proper value from within QStyle::pixelMetric() or QStyle::styleHint() (I don't remember which one is responsible for the size of the scrollbar handle).