aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickmousearea/data')
-rw-r--r--tests/auto/quick/qquickmousearea/data/qtbug34368.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmousearea/data/qtbug34368.qml b/tests/auto/quick/qquickmousearea/data/qtbug34368.qml
new file mode 100644
index 0000000000..42d8ddd3b6
--- /dev/null
+++ b/tests/auto/quick/qquickmousearea/data/qtbug34368.qml
@@ -0,0 +1,38 @@
+import QtQuick 2.2
+
+Rectangle {
+ id: root
+ color: "green"
+ width: 200
+ height: 200
+ property int clicksEnabled: 0
+ property int clicksDisabled: 0
+ property bool disableLower: false
+ MouseArea {
+ anchors.fill: parent
+ propagateComposedEvents: true
+ z: 1
+ onClicked: {
+ mouse.accepted = false;
+ clicksEnabled += 1;
+ //console.log("Upper click");
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ propagateComposedEvents: true
+ z: 0
+ enabled: !disableLower
+ onClicked: {
+ mouse.accepted = false;
+ clicksDisabled += 1;
+ //console.log("Lower click");
+ }
+ }
+ Text {
+ anchors.fill: parent
+ text: "A: " + clicksEnabled + " B:" + clicksDisabled
+ focus: true
+ Keys.onSpacePressed: root.disableLower = !root.disableLower;
+ }
+}