"Transition completed" notification
-
Greeting Qt Quickers,
I'm using the following code to get notified when a transition is completed:
@property bool pTransition: falsetransitions: Transition
{
SequentialAnimation
{
AnchorAnimation { duration: 100 }PropertyAnimation { target: item; property: "pTransition" duration: 0; to: !(pTransition) } }
}
onPTransitionChanged: console.debug("Transition completed !")@
There must be a simpler way... is there ?Thanks.
B.A.
-
Could be something like this:
@
signal stopped();transitions: Transition
{
SequentialAnimation
{
AnchorAnimation { duration: 100 }
onRunningChanged: if(!running) stopped();
}
}onStopped: console.debug("Transition completed !")
@ -
You could also use a "ScriptAction":http://qt-project.org/doc/qt-4.8/qml-scriptaction.html as the last action in a SequentialAnimation and call a signal/function to signal that the transition is done