The QPixmap class is implemented with internal data sharing, so when you pass an instance of the class by value (as you are doing with QList< QPixmap >), the pixel data is -not- copied. So you can pass your QList<> by reference or by value. If you pass by value (QList<> mylist, instead of QList<> & mylist) then the only thing copied is the list itself. The QPixmap instances in the list are not copied, only their reference counts are incremented.
See the "Detailed Description" in the QPixmap documentation and the "Implicit Sharing" overview in the Qt Core documentation.




Reply With Quote
Bookmarks