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

Qt Animation

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k 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.
  • R Offline
    R Offline
    runslow
    wrote on last edited by
    #1

    Hello,

    I am pretty new to QT. I am trying to construct an animation sequence, where the animations start at different times and have different durations. I looked at (http://doc.qt.digia.com/4.7/animation-overview.html), and in QAnimationGroup, QSequentialAnimationGroup, or QParallelAnimationGroup I did not see a way to start animations at a certain time. Here is an example:

    Animation 1 - duration 1000ms, Start Time: 0
    Animation 2 - duration 500ms, Start Time, 1000
    Animation 3 - duration 10000ms, StartTime, 200ms

    How can I nest these into a timeline and set it to start and it will play all of them?

    Hopefully this all makes sense.

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      You could use a QParallelAnimationGroup which holds 3 QSequentialAnimationGroup animations, each of which holds a QPauseAnimation (if needed) followed by your Animation[1,2,3].

      That is to say:
      @

      QParallelAnimationGroup
      Animation1 (1000ms, starts immediately)
      QSequentialAnimationGroup
      QPauseAnimation (pauses 1000 ms)
      Animation2 (runs 500ms)
      QSequentialAnimationGroup
      QPauseAnimation (pauses 200ms)
      Animation3 (runs 10000ms)
      @

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        runslow
        wrote on last edited by
        #3

        Thank you. I didn't think of that. This is perfect.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          Glad it's what you need! Be sure and edit your original post and add [Solved] to the title. Thanks!

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          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