PDA

View Full Version : QGraphicsView animation issues?



m41n1
6th June 2008, 00:15
Hi mates,

I am using QGraphicsView to show a couple of items. Geometric figures by using addLine...and so on. I use a mathematical constructive method to create these figures and then I show them. Is it possible to animate the creation? I mean, add a line, and then show it, then next one...step by step? It would be like an animation of the contraction of the geometric figure. The thing is when you show the windows, it shows it when everything is "painted". Is there to show the window before it ends painting?

Thanks in advance :)

user_mail07
6th June 2008, 02:12
Did u take a look at QGraphicsItemAnimation? You can use QTimeLine with this class to set up an time line for moving or displaying your item. There is method setTimeLine( ) of QGraphicsItemAnimation where you can set this.

wysota
6th June 2008, 07:48
Here I'd suggest using a plain QTimer and in the timeout slot adding consecutive items to the scene.