I have an application that renders many hundreds large images as QGraphicsItems in a QGraphicsView. Currently this works ok, but I'm concerned about the memory required by Qt to store the internal representation of the QGraphicsItems. I need to hold one pointer to the image in memory myself so I can perform analyses and transformations on the image. And I understand that Qt stores a second copy of the image as a QPixmap with the QGraphicsItems, is that correct?

How could I avoid this second copy? I'm willing to patch Qt or use a different rendering if that helps. I.e. I was wondering if I could instead draw OpenGL textures, and if these textures could share memory with a QImage? Did somebody try this, or does someone know how to render OpenGL textures that reference QImage memory (using shallow copy as described here: http://doc.qt.io/qt-5/implicit-sharing.html)?

Thanks for hints!