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

Improper use of stepSize property (probably off-by-1 bug in step division)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0 RC
    • Quick: Controls 2
    • None
    • c4c803ce4403a6ee675ad96416f53a983397a6d0

    Description

      The property stepSize is improperly honoured in a slider that does not start from 0. This is trivially demonstrated by this example:

      Slider {
      	from: 1
      	to: 3
      	stepSize: 1
      	snapMode: Slider.SnapAlways
      	onValueChanged: console.log(value)
      }
      

      The slider should have 3 positions: 1, 2, 3. However, it snaps at 1, 1.66, 2.33 and 3. If the slider runs from 0 to 2, the step size is correct.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-54140
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              stephane.magnenat Stéphane Magnenat
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes