It won't work that way. The method returns a QGraphicsPixmapItem so you can only assign it to QGraphicsPixmapItem or its ancesstor (QGraphicsItem) pointer.
If you want to subclass QGraphicsItem or one of its subclasses, you need to add the item to the scene in a different manner:
Qt Code:
myGraphicsItem *item = new myGraphicsItem; scene()->addItem(item);To copy to clipboard, switch view to plain text mode
Bookmarks