Hi,

i am designing a GUI for a touchscreen device (Plastique Style). So far everything is fine, except that it is very difficult to hit the slider handle, because it is way to small. Therefore i would like to increase the size of my slider handle.

My first try was to implement a style sheet for my vertical slider, like this one:
Qt Code:
  1. /* slider_pwm1 is the name of my slider */
  2. #slider_pwm1::handle:vertical {
  3. min-width: 50px;
  4. width: 50px;
  5. }
To copy to clipboard, switch view to plain text mode 
...but no success...

My second guess was to override the PixelMetric function:
Qt Code:
  1. // Override style for better Touchscreen handling
  2. class MyProxyStyle : public QProxyStyle
  3. {
  4. public:
  5. int pixelMetric ( PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const
  6. {
  7. switch(metric) {
  8. case PM_SliderControlThickness : return 50;
  9. default : return (QProxyStyle::pixelMetric(metric,option,widget));
  10. }
  11. }
  12. };
  13.  
  14. int main(int argc, char *argv[])
  15. {
  16. QApplication app(argc, argv);
  17. QApplication::setStyle(new MyProxyStyle);
  18. ...
  19. }
To copy to clipboard, switch view to plain text mode 
And again i had no success...

Now i am running out of ideas... Does anybody out there has a clue/hint/link to solve this problem ?

Thank you for your help !

Arne