hi:
How to resize slider in QScrollBar manually ?
thanks!
hi:
How to resize slider in QScrollBar manually ?
thanks!
Hi,
You have to subclass a QStyle object, and change some Pixel Metric settings for your slider.
Here, you have a list of parameters that can be tuneds :
http://doc.trolltech.com/4.1/qstyle....xelMetric-enum
In your custom style class, you have to reimplement those values in this method :
Qt Code:
int myStyle::pixelMetric(PixelMetric metric, { switch (metric) { case PM_SliderLength : return 20; // Here, just put the length you want .... .... }To copy to clipboard, switch view to plain text mode
You can check the styles example in the docs
Guilugi.
Bookmarks