Lately I've been thinking that perhaps I should write a series of example applications on how not to do animations, as anything more complex I've tried seems to end up in dismal failure.
In the hope that I and others can use my latest failure as a learning experience, I lay it out in public here. I'm attempting to make a "page" (the grid object below) to go out left, get rewritten, and come in again from the right: grid.x = 0 in the beginning. Transition { to: "nextPage"; SequentialAnimation { NumberAnimation { target: grid; properties: "x"; to: -500; duration: 3000; easing.type: Easing.InOutQuad } PropertyAction { target: grid; property: "x"; value: 500 } ScriptAction { script: { setPageTitle()} } NumberAnimation { target: grid; properties: "x"; to: 0; duration: 3000; easing.type: Easing.InOutQuad } PropertyAction { target: grid; property: "state"; value: "" } } Now the steps in SequentialAnimation certainly don't seem to be sequential despite its name. Or rather the Sequential only applies to animation parts, not the rest. setPageTitle() gets called before the page has started to move, so it is the new page that I see going out. Nothing ever comes back in, as if the second NumberAnimation would not run. How should I achieve this? It is certainly not intuitive to me. I would expect animations to have isDone() signal or similar, where I could trigger the next state to go to. Then I could chain the together if I want. If I have states A,B and C that an object to take consecutively, procedurally, from code, how to do that? Each state change has an attached animation that should run to end prior to next state happening. Thanks, Harri PS. is there qt-project.org mailing list for this list? _______________________________________________ Qt-qml mailing list Qt-qml@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-qml