I am using Qt / C ++ and trying to draw a large and complex QGraphicsScene. When I add a lot of objects, panning and zooming become unpleasantly slow. (Of course, there is nothing surprising here). I played with caching device coordinates (helps with panning to a point) and minimal updates to the viewport, etc., but in the end there are too many objects. What I would like to do is draw elements asynchronously due to user interface control. In other words, as with Google Maps, I want to pan and zoom and let the drawing get as fast as possible, but be able to pan again before the elements finish drawing.
One of the methods I'm trying to do is create two QGraphicsScenes. One has real objects, but it is not tied to QGraphicsView. Another QGraphicsScene is connected to a QGraphicsView, but it just has some tiled QPixmaps the size of which covers the screen. The plan is to use processor spare cycles to update any pixel pixel map that it needs. It seems like this will give me the necessary control over the rendering (so I donβt need to block the re-rendering of the entire visible scene). Thoughts? Has anyone implemented this?
c ++ qt qgraphicsview
Scott stafford
source share