Results 1 to 4 of 4

Thread: Speed up QTreeView animation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Speed up QTreeView animation



    Here are 2 pics from my app.I have a QTreeView in my app.When user press a button,another widget comes in and the treeview will slide from the center to the right(just like the 2nd pic.).

    The problem is the animation is kinda slow(when I have as much items as the picture shows).
    If I have only a few items in my treeview(4 or 5...),the animation is smooth.
    I guess it's because treeview is updating all the items when it animates.But I don't know how to make it faster.Anybody knows?
    It's not the goodbye that hurts,but the flashback that follow.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Speed up QTreeView animation

    You can disable animations with QTreeView::setAnimated

  3. #3
    Join Date
    Apr 2010
    Posts
    98
    Thanks
    19
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Speed up QTreeView animation

    I'm not talking about the animation of expanding the treeview.
    I was trying to move the QTreeView from one position to another,by using QPropertyAnimation.But when there's a lot items in the treeview,the animation is slow.
    It's not the goodbye that hurts,but the flashback that follow.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Speed up QTreeView animation

    You can use a trick then -
    To start animation, hide the treeview and render the treeview onto a pixmap.
    Now perform animation on this pixmap.
    Finally when the animation ends, hide the pixmap and show the treeview again...
    This should speed up things :-)

  5. The following user says thank you to aamer4yu for this useful post:

    MorrisLiang (18th June 2010)

Similar Threads

  1. QMovie animation
    By Sahab in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2010, 11:19
  2. Animation Framework?
    By TheJim01 in forum Newbie
    Replies: 2
    Last Post: 10th February 2010, 17:54
  3. Some questions about QT animation?
    By tszzp in forum Qt Programming
    Replies: 7
    Last Post: 28th October 2009, 09:20
  4. Animation in Qt
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 3
    Last Post: 25th June 2009, 07:05
  5. Animation in Qt
    By yogesh884 in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2009, 09:56

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.