aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2011-07-29 10:38:35 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-02 10:46:54 +0200
commit09f4bd20d7514f229338667effdf8519f1722b3f (patch)
treecb907a723793b0102ad3965ba2855c364c32a21b /tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml
parent6f146a5d2ea893b13e4cfcd90243e66f7c9a0083 (diff)
Cancel mousearea pressed state when window is deactivated
Change-Id: I1cc21c338576a2ac3b1e8e282e8e4de3bc63759a Task-number:QTBUG-19904 Reviewed-on: http://codereview.qt.nokia.com/2357 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml')
-rw-r--r--tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml b/tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml
new file mode 100644
index 0000000000..231436d0f2
--- /dev/null
+++ b/tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ id: root
+ color: "#ffffff"
+ width: 320; height: 240
+ property bool pressed:mouse.pressed
+ property bool canceled: false
+ property bool released: false
+
+ MouseArea {
+ id: mouse
+ anchors.fill: parent
+ onPressed: { root.canceled = false }
+ onCanceled: {root.canceled = true}
+ onReleased: {root.released = true; root.canceled = false}
+ }
+} \ No newline at end of file