Did you enable caching for the items? Also how did you define shape() and boundingRect() for your items? Did you make a QGLWidget the viewport of your view to enable hardware accelleration? To make things faster you can also mark the view as non-interactive, if you can afford it.
I didn't call setCacheMode so it is using NoCache. The graphics is zoomable and the xy scale can be changed interactively, so I suppose caching is not useful.
The shape is not defined, and the bundingRect is properly computed. I don't use QGLWidget and have never used it. Does it work for both Linux and Window?
I don't understand "mark the view as non-interactive". My graphics display is very interactive, such as zoom, scale changes, object selection, pen and brush can also be edited...
When zoom in to small portion, it is fast because I recompute all sub-boundingRect so only render the portion of object really on screen. But not on "view all" mode.
Interactive means thats your QGraphicsView is read only.
Another advice for your problem :
if you overload the paint method of your QGraphicsItem, you will find a QStyleOptionGraphicsItem as argument
It stores the rect that need to be repaint, according to the ViewportUpdateMode of your view
and the lod, that is the scale factor of your scene.
Since the painter draw all edges of yours polygons, even if reduced all to one pixel, maybe you need to simplify it before displaying it
S.Cascio
Bookmarks