Results 1 to 3 of 3

Thread: Tick Labels for Slider

  1. #1
    Join Date
    Jul 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Tick Labels for Slider

    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.
    Joel

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Tick Labels for Slider

    You could try QwtSlider.

    Uwe

  3. #3
    Join Date
    Jul 2007
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Tick Labels for Slider

    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.

Similar Threads

  1. QSlider with a custom set of labels for the tick marks?
    By whitefurrows in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2007, 16:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.