I believe you can do this by using the RunningChanged signal from the transition:
transitions: [
Transition {
to: "rest"
PropertyAnimation {
target: root
properties: "value"
duration: 1000
}
onRunningChanged: {
if ((state == "rest") && (!running))
switchState();
}
}
]
QML Objects have an associated signal for property changes (on<Property>Changed
). The associated handlers are usually not documented in the objects' references, but are implicitly available due to the property's existence. See this.