diff options
Diffstat (limited to 'src')
-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 |