diff options
Diffstat (limited to 'src/declarative/util/qmlstateoperations.cpp')
-rw-r--r-- | src/declarative/util/qmlstateoperations.cpp | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 755befe..01f9cdd 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -212,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 |