def parent_widget ( self ) : parent = self . parent ( ) if parent is not None and isinstance ( parent , QtGraphicsItem ) : return parent . widget
qwidget won't show if parent set in constructor in python
Reimplemented to only return GraphicsItems
def parent_widget(self):
        """ Reimplemented to only return GraphicsItems """
        parent = self.parent()
        if parent is not None and isinstance(parent, QtGraphicsItem):
            return parent.widget