aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qdeclarativeanimations/data/propertiesTransition3.qml
blob: 7d3b3b9c6d112c43ed6c8b53855047b3b22ddc83 (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
import QtQuick 2.0

Rectangle {
    width: 400
    height: 400
    Rectangle {
        id: theRect
        objectName: "TheRect"
        color: "red"
        width: 50; height: 50
        x: 100; y: 100
    }

    states: State {
        name: "moved"
        PropertyChanges {
            target: theRect
            x: 200
        }
    }
    transitions: Transition {
        NumberAnimation { targets: theRect; properties: "y" }
    }

    MouseArea {
        anchors.fill: parent
        onClicked: parent.state = "moved"
    }
}