PDA

View Full Version : QGraphicsPixmapItems through QGLWidget - clearing textures?



robertson1
15th October 2008, 13:28
Hi,

Im displaying large images as tiles of QGraphicsPixmapItem's in a graphics view which rendered through a QGLWidget. This seems to be very quick to draw and all is well except when I want to remove and load another set of QGraphicsPixmapItem's.

They get removed ok, but when I try and load in another set, it takes forever (several minutes) for them to be displayed. Do I have to explicitly clear the old textures from the QGLWidget somehow?

Thanks in advance

Jamie

robertson1
16th October 2008, 23:08
Deleting and re-creating the QGraphicsView is the only thing I have managed to do so far which actually loads subsequent sets of QGraphicsPixmapItems at a reasonable speed when using a QGLWidget as a viewport. (I only occasionaly need to remove / add QGraphicsPixmapItems).

It works ok though when using a normal QWidget as a viewport, problem is I need to use a QGLWidget. Anyone know why it's so slow?