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. :D
Re: QGraphicsView and animation framework
Quote:
Originally Posted by
Diph
QGraphicsView in QGraphicsView doesn't sound like such a good idea. :D
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).
Re: QGraphicsView and animation framework
Quote:
Originally Posted by
Lykurg
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)?
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.