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

SpinBox: Allow customization of increase/decrease behavior

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.x
    • Quick: Controls 2
    • None

    Description

      Currently, this is somewhat possible by doing something like stepSize: down.pressed ? downStepSize : upStepSize, but this only works when pressing the up or down buttons with the mouse or the up or down arrow keys. It does not work when using the mouse wheel to change the value or when calling increase() or decrease() directly.

      An example of a use case would be a zoom spinbox for a viewport where the increment by which you zoom changes based on whether you are zooming in or out and how zoomed in you are. If you want to be able to zoom in 1.25x the current zoom level when you increment, you would need to zoom out 0.8x when you decrement in order to go back to where you started (1*1.25=1.25, 1.25*0.8=1).

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            ndavis Noah Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: