Results 1 to 4 of 4

Thread: QSlider with a custom set of labels for the tick marks?

  1. #1
    Join Date
    May 2006
    Posts
    108
    Thanks
    35
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question QSlider with a custom set of labels for the tick marks?

    Hello,

    does anyone know how can display a custom set of labels for the different ticks?
    I would not like to use qwt!

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSlider with a custom set of labels for the tick marks?

    You can subclass QSlider and draw the tickmark labels yourself in its paintEvent.
    I don't think there is another way, besides creating a style for your slider.

    You could copy the relevant code from Qwt. They must be doing the same thing.

    Regards

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

    Default Re: QSlider with a custom set of labels for the tick marks?

    QwtSlider is much older than QSlider. (The first release of Qwt was developed for Qt 1.1). So it completely unrelated to QSlider.

    Uwe

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSlider with a custom set of labels for the tick marks?

    Well, I guess this makes it even harder.

    Regards

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.