diff options
Diffstat (limited to 'tests/manual/pointer/pinchHandler.qml')
-rw-r--r-- | tests/manual/pointer/pinchHandler.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/pointer/pinchHandler.qml b/tests/manual/pointer/pinchHandler.qml index 46ab91c2ed..93169da60a 100644 --- a/tests/manual/pointer/pinchHandler.qml +++ b/tests/manual/pointer/pinchHandler.qml @@ -154,6 +154,14 @@ Rectangle { if (!active) anim.restart(centroid.velocity) } + onGrabChanged: function (transition, point) { + if (transition === 0x10) { // GrabExclusive + console.log(point.id, "grabbed @", point.position) + Qt.createQmlObject("import QtQuick 2.0; Rectangle { opacity: 0.5; border.color: 'red'; radius: 8; width: radius * 2; height: radius * 2; " + + "x: " + (point.position.x - 8) + "; y: " + (point.position.y - 8) + "}", + rect3, "touchpoint" + point.id); + } + } } TapHandler { gesturePolicy: TapHandler.DragThreshold; onTapped: rect3.z = rect2.z + 1 } MomentumAnimation { id: anim; target: rect3 } |