aladagemre
6th November 2010, 11:24
I was wondering why the flickering problems occur for animated QGraphicsItems.
I'm drawing graphs with node/edges. Nodes are animated (by scaling up/down) when clicked. During the animation, edges are moved to adapt the new position of the node. But this movement causes flickering.
It's a bit hard for me to provide a minimal example so I was wondering if anybody has experience with this issue to guess the reason for that.
I used edge.prepareForGeometryChange() for all edges but it did not solve the problem completely.
I tried to update the scene at each last frame of the animation but it did not solve the problem completely either.
Then after recording this video, I updated the bounding rect for the edges when nodes positions changed.
All these methods seemed to improve the flickers but still some flickering remains. In general, few of the edges have flickering but if I move any of the nodes, flickering becomes common although I apply update for bounding rects and the scene.
Here's a video demonstration:
http://vimeo.com/16559528
Does anybody have an opinion how to get over this? If no answers would come, I'll have to spend some time o provide minimal example.
Thanks,
I'm drawing graphs with node/edges. Nodes are animated (by scaling up/down) when clicked. During the animation, edges are moved to adapt the new position of the node. But this movement causes flickering.
It's a bit hard for me to provide a minimal example so I was wondering if anybody has experience with this issue to guess the reason for that.
I used edge.prepareForGeometryChange() for all edges but it did not solve the problem completely.
I tried to update the scene at each last frame of the animation but it did not solve the problem completely either.
Then after recording this video, I updated the bounding rect for the edges when nodes positions changed.
All these methods seemed to improve the flickers but still some flickering remains. In general, few of the edges have flickering but if I move any of the nodes, flickering becomes common although I apply update for bounding rects and the scene.
Here's a video demonstration:
http://vimeo.com/16559528
Does anybody have an opinion how to get over this? If no answers would come, I'll have to spend some time o provide minimal example.
Thanks,