diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-24 04:45:31 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-24 06:10:31 (GMT) |
commit | e71d06bc420a837438c72616f88167b4a141b627 (patch) | |
tree | 8e266b8d17efb26fdf1b41a7d586708624f000a1 | |
parent | 08ef576f3bd492b60925c25945d9f8c2c8a26886 (diff) | |
download | Qt-e71d06bc420a837438c72616f88167b4a141b627.zip Qt-e71d06bc420a837438c72616f88167b4a141b627.tar.gz Qt-e71d06bc420a837438c72616f88167b4a141b627.tar.bz2 |
ScriptAction doc.
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index b5530f7..6250132 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -658,6 +658,37 @@ void QDeclarativeColorAnimation::setTo(const QColor &t) \inherits Animation \brief The ScriptAction element allows scripts to be run during an animation. + ScriptAction can be used to run script at a specific point in an animation. + + \qml + SequentialAnimation { + NumberAnimation { ... } + ScriptAction { script: doSomething(); } + NumberAnimation { ... } + } + \endqml + + When used as part of a Transition, you could also target a specific + StateChangeScript to run using the \c scriptName property. + + \qml + State { + StateChangeScript { + name: "myScript" + script: doStateStuff(); + } + } + ... + Transition { + SequentialAnimation { + NumberAnimation { ... } + ScriptAction { scriptName: "myScript" } + NumberAnimation { ... } + } + } + \endqml + + \sa StateChangeScript */ /*! \internal |