Function runs together?



  • I have two annimation function below
    @ NumberAnimation {
    id: animJarooWUp
    target: jaroo
    properties: "width"
    from: 82
    to: 100
    duration: 200
    }
    NumberAnimation {
    id: animJarooHUp
    target: jaroo
    properties: "height"
    from: 82
    to: 100
    duration: 200
    }@
    I use these to one after another with:
    @animJarooWUp.start();
    animJarooHUp.start();@
    but the two animation runs together and I don't like it; I want to program complete the 1st anim then run the 2nd. What's wron?


  • Moderators

    You need to use "SequentialAnimation":http://qt-project.org/doc/qt-4.8/qml-sequentialanimation.html element.



  • Animation execution will be threaded, so the stat() methods for both will be called immediately. You could use a SequentialAnimation element:

    @SequentialAnimation{id: seqAnimation
    NumberAnimation{
    stuff
    }
    NumberAnimation{
    more stuff
    }
    }

    seqAnimation.start();
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.