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

pointer handlers need both gesture-duration and accumulated properties with setters

    XMLWordPrintable

Details

    • 7867a683f (dev), a432970b2 (dev), 442eeba67 (dev), c4aaa7dac (6.6), f08c70832 (6.5)

    Description

      This is a generalization of QTBUG-68941, to which we responded by making PinchHandler.scale be the accumulated scale (for easy binding to Item.scale), while activeScale is the value that resets to 1 each time a gesture begins. We should have followed through and done that with all such properties:

      • PinchHandler.rotation
      • PinchHandler.translation
      • DragHandler.translation

      WheelHandler.rotation is already that way. There's no activeRotation because many wheel events don't have phase: with an old-fashioned wheel mouse, we can't tell when the gesture begins and ends, so I guess activeRotation would tend to stay small (just the value from the previous or current event). But WheelHandler.rotation has a setter, and QTBUG-76379 is asking for PinchHandler.scale to have a way to reset the value.

      So we can generalize that too: each of these properties should have setters. If the UI provides more than one way to translate an item, and if you are using a handler's translation property in a binding, you need to be able to set that property when the item is moved by alternate means. Likewise with rotation.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: