Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Sequentialanimation inside a Parallelanimation



  • Is it possible to define a sequentialanimation inside a parallelanimation? Or does somebody know another way to do it? I would like to do something like this:

    @
    ParallelAnimation {
    id: scaleoutLeft
    running: scaleout

                NumberAnimation { target: item; property: "x"; to: 100; duration: 1000 }
                
                SequentialAnimation {
                PropertyAction { target: item; property: "smooth"; value: false }
                NumberAnimation { target: item; property: "scale"; to: 1; duration: 1000 }
                PropertyAction { target: item; property: "smooth"; value: true }
                }
            }
    

    @

    Thanks



  • Yes it's possible to do that. Have you given it a try? I cannot see any reason for it not to work as expected.



  • Thanks. I tried it about 2 weeks ago without success, but now it's easy .. :)

    What I did is:

    @ParallelAnimation{
    ...
    SequentialAnimation{
    ...
    ParallelAnimation { ... }
    }
    }@

    Do you think this affects somehow the performance?



  • If you only have one animation inside a ParallellAnimation or SequentialAnimation I'm not sure it actually does anything useful... does it?



  • Well I need it to turn off the smooth parameter during a moveAnimation of an image. So yes, I think its useful ;)



  • Right, you are using PropertyAction, which really is an animation, without duration. Without the whole code it's a bit difficult to understand why you need all three levels of animations, though.


Log in to reply