aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickbehaviors/data/duplicated.qml
blob: 15518a05cfd95e209b483375fdf999fdcdc06810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
        }
    }
}