Results 1 to 4 of 4

Thread: QGraphicsView and animation framework

  1. #1
    Join Date
    Jun 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QGraphicsView and animation framework

    I have QWidget and QGraphicsView components in my program and I want to animate QWidget (move it on top of the graphics view). In animation framework example, widgets are placed in QGraphicsScene and then animated. I tried to put both QWidget and QGraphicsView in scene but then the graphics view is really slow.

    Are there alternative ways to animate the UI than putting the widgets in the scene? QGraphicsView in QGraphicsView doesn't sound like such a good idea.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QGraphicsView and animation framework

    Quote Originally Posted by Diph View Post
    QGraphicsView in QGraphicsView doesn't sound like such a good idea.
    Right! You can use the animation also outside the graphics view. You can use setGeometry() and arrange your widgets manually and after the animation you can set them back in a layout (if needed).

  3. #3
    Join Date
    Jun 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QGraphicsView and animation framework

    Quote Originally Posted by Lykurg View Post
    Right! You can use the animation also outside the graphics view. You can use setGeometry() and arrange your widgets manually and after the animation you can set them back in a layout (if needed).
    So which layout I should use? If I want to be able to move widget from outside of the window (hidden) to on top of the graphics view (which covers the whole window)?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGraphicsView and animation framework

    Widgets can't be in a layout if you wish to move them. There is an alternative that you will implement your own layout class that will use the animation framework to synchronize moving widgets around.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Animating many objects with the Qt Animation Framework
    By pherthyl in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2010, 16:45
  2. Animation Framework?
    By TheJim01 in forum Newbie
    Replies: 2
    Last Post: 10th February 2010, 17:54
  3. Using the animation framework with graphic items
    By technoViking in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 02:38
  4. Can you use the animation framework on graphic items?
    By technoViking in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2009, 19:34
  5. Qt Animation Framework install and examples?
    By been_1990 in forum Installation and Deployment
    Replies: 2
    Last Post: 4th July 2009, 19:17

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.