This would fail if `item` is not a subclass of GraphicsItem (any of the native QGraphicsItem classes)