Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0 Beta2
-
None
-
07aaa7c1b (dev), 79b83a188 (6.5)
Description
The docs say:
activeTranslation : QPointF
The translation of the cluster of points while the pinch gesture is being performed. It is 0, 0 when the gesture begins, and increases as the eventPoint(s) are dragged downward and to the right. After the gesture ends, it stays the same; and when the next pinch gesture begins, it is reset to 0, 0 again.
persistentTranslation : QPointF
The translation to be applied to the target if it is not null. Otherwise, bindings can be used to do arbitrary things with this value. While the pinch gesture is being performed, activeTranslation is continuously added to it; after the gesture ends, it stays the same.
It's possible to set this property, as a way of synchronizing the basis translation with a translation that was set in some other way, for example by another handler. If you set this property directly, activeTranslation does not change, and translationChanged(0, 0) is emitted.
note On some touchpads, such as on a macOS trackpad, native gestures do not generate any translation values, and this property stays at 0, 0.
But while writing a native-gesture autotest, it seems rather that persistentTranslation is the same as the target item position. It's not the delta by which QQuickItemPrivate::adjustedPosForTransform() moved it, and it doesn't stay at 0, 0 either.
On an Apple trackpad on macOS, the native gesture event does not tell us that the "cluster of points" moves during the pinch (and this agrees with the fact that the mouse cursor does not move); so it seems correct that activeTranslation stays at 0, 0 (as it currently does). But we can also test on other OSes, in case the gesture and the cursor are actually seen to move.
Anyway we need better test coverage for these properties, both with native gestures and touchpoint-handling cases.
And the meaning of these properies should be consistent between PinchHandler and DragHandler.
Attachments
Issue Links
- relates to
-
QTBUG-111204 PinchHandler native-gesture scaling is no longer cumulative
- Closed
- resulted from
-
QTBUG-94168 pointer handlers need both gesture-duration and accumulated properties with setters
- Closed
For Gerrit Dashboard: QTBUG-111220 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
224329,9 | Refactor QQuickDragHandler into public and private classes | dev | qt/qtdeclarative | Status: NEW | -1 | 0 |
461129,5 | Refactor QQuickPinchHandler into public and private classes | dev | qt/qtdeclarative | Status: NEW | +1 | 0 |