Does QGraphicsPixmapItem::QGraphicsPixmapItem(const QPixmap & pixmap, QGraphicsItem * parent = 0) perform a Deep Copy of pixmap
-
I'm considering implementing a ResourceManager class to store all of the QPixmaps which would appear in my game, but am wondering if the constructor QGraphicsPixmapItem::QGraphicsPixmapItem(const QPixmap & pixmap, QGraphicsItem * parent = 0) performs a deep copy of the pixmap parameter. It seems pretty wasteful to me for each QGraphicsPixmapItem to store its own copy of the QPixmap, but the constructor accepts a constant reference instead of a pointer and QGraphicsPixmapItem::pixmap() returns a copy, not a (constant) reference of its QPixmap.
-
It seems your goal is to have something as "QPixmapCache":http://doc.trolltech.com/4.6-snapshot/qpixmapcache.html, isn't it?