diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-08-02 06:22:43 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-08-02 06:23:13 (GMT) |
commit | 3daee8e915f9845fb104e57c7f35fdb2f7251df5 (patch) | |
tree | 148f27269a3f3a921fb95a85b367487fae2155aa /doc/src/snippets/declarative/states.qml | |
parent | 969daadd245153e8bb6c9a89a51565b83832f484 (diff) | |
download | Qt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.zip Qt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.tar.gz Qt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.tar.bz2 |
State doc fixes, improvements
Task-number: QTBUG-12570
Diffstat (limited to 'doc/src/snippets/declarative/states.qml')
-rw-r--r-- | doc/src/snippets/declarative/states.qml | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index c3b1796..127e3a7 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -40,42 +40,22 @@ ****************************************************************************/ //![0] import Qt 4.7 - -Item { - id: myItem + +Rectangle { + id: myRect width: 200; height: 200 + color: "red" - Rectangle { - id: myRect - width: 100; height: 100 - color: "red" + MouseArea { + anchors.fill: parent + onClicked: myRect.state = 'moved' } states: [ State { name: "moved" - PropertyChanges { - target: myRect - x: 50 - y: 50 - } + PropertyChanges { target: myRect; x: 50; y: 50 } } ] - - MouseArea { - anchors.fill: parent - onClicked: myItem.state = 'moved' - } -//![0] - -//![transitions] -transitions: [ - Transition { - NumberAnimation { properties: "x,y"; duration: 500 } - } -] -//![transitions] - -//![1] } -//![1] +//![0] |