Results 1 to 2 of 2

Thread: Animating many objects with the Qt Animation Framework

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Animating many objects with the Qt Animation Framework

    Hi everyone,

    I have an app where the transition from one state to the next is animated. In this case, the box that is clicked animates its size larger, and all the other boxes on the screen fade out until they are hidden.

    Now, back before state machines and animation frameworks in Qt, I read Aaron Seigo's post on performance in these cases (http://aseigo.blogspot.com/2008/02/a...taneously.html) and thus I have only one QTimeline to manage the whole transition, and each box does whatever it needs to do in onAnimationValueChanged.

    This works well. However now I'm wanting to take advantage of the simplicity of the animation framework and toss my homegrown solution.

    The easiest way would be for each box to have its own QPropertyAnimation and just handle animating itself. However, would all the performance problems that Aaron writes about still apply to the animation framework? Does it do anything internally to combine timer events and improve performance, or do I have to create a QParallelAnimationGroup and add all the box animations to that to realize the same performance improvements?

    Thanks
    Last edited by pherthyl; 22nd March 2010 at 16:42.

  2. #2
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Animating many objects with the Qt Animation Framework

    Well I implemented it with QtPropertyAnimattions in each item, and performance doesn't seem to be any worse so I guess that answers my question.

Similar Threads

  1. Animation Framework?
    By TheJim01 in forum Newbie
    Replies: 2
    Last Post: 10th February 2010, 17:54
  2. Using the animation framework with graphic items
    By technoViking in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 02:38
  3. Can you use the animation framework on graphic items?
    By technoViking in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2009, 19:34
  4. Qt Animation Framework install and examples?
    By been_1990 in forum Installation and Deployment
    Replies: 2
    Last Post: 4th July 2009, 19:17
  5. animating a toolbar??!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2006, 08:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.