I don't think qgraphicsitem_cast will work the way you are using it.
Check your pointer in debug mode:Qt Code:
BackgroundItem *myBackItem = qgraphicsitem_cast<BackgroundItem*>(graphicItems.at(i)); Q_ASSERT(myBackItem);To copy to clipboard, switch view to plain text mode
Try static_cast instead.
Bookmarks