'Workaround for PyQt bug in qgraphicsscene.items()
All subclasses of QGraphicsObject must register themselves with this function.
(otherwise, mouse interaction with those objects will likely fail)'

@classmethod
def registerObject(cls, obj):

    if (HAVE_SIP and isinstance(obj, sip.wrapper)):
        cls._addressCache[sip.unwrapinstance(sip.cast(obj, QtGui.QGraphicsItem))] = obj
