aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickbehaviors/data/duplicated.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickbehaviors/data/duplicated.qml')
-rw-r--r--tests/auto/quick/qquickbehaviors/data/duplicated.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickbehaviors/data/duplicated.qml b/tests/auto/quick/qquickbehaviors/data/duplicated.qml
new file mode 100644
index 0000000000..15518a05cf
--- /dev/null
+++ b/tests/auto/quick/qquickbehaviors/data/duplicated.qml
@@ -0,0 +1,31 @@
+import QtQuick 2.0
+Rectangle {
+ id: main
+
+ width: 400
+ height: 400
+
+ property bool behavior1Triggered
+ property bool behavior2Triggered
+
+ Behavior on x {
+ ScriptAction { script: behavior1Triggered = true }
+ }
+ Behavior on x {
+ ScriptAction { script: behavior2Triggered = true }
+ }
+
+ MouseArea {
+ id: clicker
+ anchors.fill: parent
+ }
+
+ states: State {
+ name: "moved"
+ when: clicker.pressed
+ PropertyChanges {
+ target: main
+ x: 200
+ }
+ }
+}