How can we create custom slider?
-
I want to create a slider which contain a custom slider handle and i want to paint it according to slider handle position.
-
you could subclass QAbstractSlider and do all on your own or derive from QSlider. Just check, how much you have to change...
-
can we paint some portion of slider and change it according to requirement?
-
If the docs do notstate it, not.
You could use style sheets for that, there you can change the handle etc.
Also using a custom style would be possible, as all parts of the slider are drawn by the style. -
I did something that maybe is also for you.
I subclassed QAbstactSlider and reimplemented paint event to draw a custom handler and a buffer progress under it like when you watch videos on the web.
You can find the sources "here":https://gitorious.org/mediadownloader/mediadownloader/blobs/master/main/mbslider.cpp -
thank's