I seem to have found the problem. Doing the following works:
Qt Code:
dynamic_cast<Base *>(item);To copy to clipboard, switch view to plain text mode
The qgraphicsitem_cast documnetation states:
Since I am not casting to the exact type defied by qgraphicsitem::type(), but to my base class instead, it would appear that I need to use a dynamic cast.Note: To make this function work correctly with custom items, reimplement the type() function for each custom QGraphicsItem subclass.
Bookmarks