views:

31

answers:

1

I have a QGraphicsView and a slide show of QGraphicsScenes, at the moment when the user switches to the next slide I just change the Scene that the View is looking at and it changes instantly to reflect that.

What I would like to do it create some transition effects, such as the rotating cube or the slide in/out.

However looking at the QPropertyAnimation class it seems to be about moving an object not transitioning from one to another.

As in I would need a view for each scene and then transition between each view.

What other strategy could I employ?

+2  A: 

Instead of changing the scene that the view sees, you could use property animations to slide graphic items in and out of the view from a single scene. That would give you the slide in/out transition without too much effort. The rotating cube effect would be trickier but I think a reasonable facsimile could be produced with property animations.

You could also simulate other effects by subclassing the view widget and adding some custom properties that you could animate and use to direct background or foreground painting.

Arnold Spence