PDA

View Full Version : solved Help making a list of QGraphicsPixmapItems



jumico
15th April 2010, 08:42
Nevermind I have found a way to accomplish my goal using a QGraphicsPixmapItem within a class which I put in a list
I'm having trouble making a list of QgraphicsPixmapItems. What I want to do is have them in a list and when I want to do something with the image like rotate it or move it I can go through the list and do that. Here is what I'm trying.

QGraphicsPixmapItem *car;
car = addpixmap(Qpixmap(path));
QList<QGraphicsPixmapItem> list;
list.append(car); //This is the line the error occurs at

When I try this I get this error message multiple times.

c:\Qt\2010.02.1\qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:924: error: 'QGraphicsPixmapItem::QGraphicsPixmapItem(const QGraphicsPixmapItem&)' is private within this context

It points me to the qlist.h file or other header file pointing to something like this

private:
Q_DISABLE_COPY(QGraphicsPixmapItem)
Q_DECLARE_PRIVATE(QGraphicsPixmapItem)

Any ideas of what is wrong?