Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Function runs together?
Qt 6.11 is out! See what's new in the release blog

Function runs together?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siaswar
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

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

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        admiralfluff
        wrote on last edited by
        #3

        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();
        @

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved