diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-06 05:58:48 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-06 05:58:48 (GMT) |
commit | cb85dd1db4e42b35fd3727874d718389238b801f (patch) | |
tree | 2e7967d4d6ab6e49cd2786e85a4af9ca279f4814 /examples | |
parent | af60a29d79bca27dde9441b6b8fc0eae185f08d5 (diff) | |
parent | 51381e1454070960bc3c1d6acdfa8e742c37620c (diff) | |
download | Qt-cb85dd1db4e42b35fd3727874d718389238b801f.zip Qt-cb85dd1db4e42b35fd3727874d718389238b801f.tar.gz Qt-cb85dd1db4e42b35fd3727874d718389238b801f.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Labs (experimental) Gesture support.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/gestures/experimental-gestures.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/declarative/gestures/experimental-gestures.qml b/examples/declarative/gestures/experimental-gestures.qml new file mode 100644 index 0000000..914d403 --- /dev/null +++ b/examples/declarative/gestures/experimental-gestures.qml @@ -0,0 +1,27 @@ +import Qt 4.7 +import Qt.labs.gestures 1.0 + +// Only works on platforms with Touch support. + +Rectangle { + id: rect + + GestureArea { + anchors.fill: parent + + // Only some of the many gesture properties are shown. See Gesture documentation. + + onTap: + console.log("tap pos = (",gesture.position.x,",",gesture.position.y,")") + onTapAndHold: + console.log("tap and hold pos = (",gesture.position.x,",",gesture.position.y,")") + onPan: + console.log("pan delta = (",gesture.delta.x,",",gesture.delta.y,") acceleration = ",gesture.acceleration) + onPinch: + console.log("pinch center = (",gesture.centerPoint.x,",",gesture.centerPoint.y,") rotation =",gesture.rotationAngle," scale =",gesture.scaleFactor) + onSwipe: + console.log("swipe angle=",gesture.swipeAngle) + onGesture: + console.log("gesture hot spot = (",gesture.hotSpot.x,",",gesture.hotSpot.y,")") + } +} |