Question

I would like to change the colors of the handle of a qwtSlider. Also I would like to set the size of the slider-bar itself. I know I can use setBackgroundStyle(), but I would like to specify the size and color of all parts myself.

Was it helpful?

Solution

I think it is not possible using Qt Stylesheets (although I'd love to be proven wrong).

To change the colors of the handle of a QwtSlider you can subclass it and reimplement void drawThumb(...) The code of qwt_slider.cpp shows how/which colors are chosen.

Analogously you can change other appearance properties by reimplementing other functions from QwtSlider.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top