Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-990

QSlider tick positions

    XMLWordPrintable

Details

    Description

      It seems impossible to query for tick mark positions in a way that will work with all styles. You can get an approximation using some pixelMetrics and QStyle::sliderPositionFromValue() but it won't be perfect in all styles. This should be exposed somehow.

      It's a rather common thing to want to line some text up with the tick marks (maybe adding support for labels on the slider would do the job)

      There's also a request for assigning labels to the tick positions.

      Resolution: Tick marks are style dependent, and the style is even free to disable them completely. If you want to add text to the ticks, it sounds like you should be styling the slider - e.g., writing a proxy style that changes the appearance for QStyle::CC_Slider only.

      Update: This has been reopened as a suggestion for QSlider, with extra information added.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes