summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstateoperations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmlstateoperations.cpp')
-rw-r--r--src/declarative/util/qmlstateoperations.cpp42
1 files changed, 31 insertions, 11 deletions
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 8a10ca3..01f9cdd 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -59,6 +59,7 @@ public:
};
/*!
+ \preliminary
\qmlclass ParentChange
\brief The ParentChange element allows you to reparent an object in a state.
*/
@@ -211,17 +212,36 @@ QmlRunScript::ActionList QmlRunScript::actions()
the current state:
\code
- <Rect id="myrect" width="50" height="50" color="red"/>
-
- <states>
- <State name="Position1">
- <SetProperty target="{myrect}" property="x" value="150"/>
- <SetProperty target="{myrect}" property="y" value="50"/>
- </State>
- <State name="Position2">
- <SetProperty target="{myrect}" property="y" value="200"/>
- </State>
- </states>
+ Rect {
+ id: myrect
+ width: 50
+ height: 50
+ color: "red"
+ }
+
+ states: [
+ State {
+ name: "Position1"
+ SetProperty {
+ target: myrect
+ property: "x"
+ value: 150
+ }
+ SetProperty {
+ target: myrect
+ property: "y"
+ value: 50
+ }
+ },
+ State {
+ name: "Position2"
+ SetProperty {
+ target: myrect
+ property: "y"
+ value: 200
+ }
+ }
+ ]
\endcode
\sa SetProperties