[Qt-qml] Animation events

Jason H scorp1us at yahoo.com
Fri Sep 24 03:47:54 CEST 2010


I know I've asked something like this before, but I've never gotten anything to 
work like I wanted. Plus it's mutated over time.
I have a collection of components. I will start an animation in the first 
component. When the animation completes, I want it to consult an external source 

(database, web URL, etc) to decide what component to run next, then run its 
animation. And so on.

But I don't want one component calling the next because the call stack would 
just keep increasing, I want a root element doing it 

all.
//main.qml
Rectangle{ 
    id: root
    width: 860
    height: 540
    Loader { source: "A.qml" }
    Loader { source: "B.qml" }
    function pickNext()
    {
        // pick nect
    }
}
but the animation finishes and has no way (that I found) for the 
animation in A.qml to inform the root element that it is time to pick the 
next one.
the Loader does not set the parent property of the loaded qml item.

If this were C++ I'd have the A.qml emit a signal, which would be caught by 
root. 


Help?
Thanks!


      



More information about the Qt-qml mailing list