View Full Version : Tick Labels for Slider

8th August 2007, 20:26
My dialog has a vertical slider and I'd like to add some text labels for the tick marks. If the slider has six values, I can make six labels and use a grid layout. The labels will be close enough, but not exactly lined up. If I change the slider to four values and make four labels with a grid layout, the labels are not lined up. I didn't see any properties for tick labels on QSlider or QAbstractSlider. :(

Does anyone make labels for their sliders? How can I get my labels aligned with the tick marks? Thanks for your suggestions.

8th August 2007, 23:16
You could try QwtSlider (http://qwt.sourceforge.net/controlscreenshots.html).


9th August 2007, 17:21
Thanks for the suggestion. The QwtSlider looks great, but since it is from sourceforge, it's rather difficult to use on my project due to unreasonable security concerns. Maybe, I'll see how they implement their labels and do something similar.