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

RangeSlider stepSize does not properly take into account "from"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.7.1
    • 5.7.0
    • Quick: Controls 2
    • None
    • Qt 5.7 on Windows 10
    • 37b714d3e09f839553e9d4a151b44b647e39c548

    Description

      The RangeSlider value property does not take into account the from value when the stepSize is changed.

      RangeSlider {
          from: 10
          to: 100
          second.value: to
          stepSize: 10
          snapMode: RangeSlider.SnapAlways
          first.onValueChanged: console.log("Value is", first.value)
      }

      Move the slider, the console will print

      qml: Value is 10
      qml: Value is 19
      qml: Value is 28
      qml: Value is 37
      qml: Value is 46
      qml: Value is 55
      qml: Value is 64
      qml: Value is 73
      qml: Value is 82
      qml: Value is 91
      qml: Value is 100

      rather than stubbornly increasing by the set stepSize of 10. If I change from to 0 this works as expected.
      The snapMode does not affect this behavior.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              broulik Kai Uwe Broulik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes