summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/states.qml
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
commitd5491ecdde14659a913c9f476f18c45f1d9489bb (patch)
tree06cc52249feda9bd9e50ca47abb8ebd676c8a309 /doc/src/snippets/declarative/states.qml
parent42cdfaf86d34afeb6448723839fef70fe477deed (diff)
parenta41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff)
downloadQt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts: configure
Diffstat (limited to 'doc/src/snippets/declarative/states.qml')
-rw-r--r--doc/src/snippets/declarative/states.qml38
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]