Hi,<br>I'm using the newest version of Qt and PyQt. I have my own subclass of QGraphicsItem and it happens that I get the same reference when creating two instances.<br><br>I suppose the subclass is implemented properly, here is the beginning which is the most crucial part:
<br>class Circle(QtGui.QGraphicsItem):<br> def __init__(self, radius, items, parent):<br> QtGui.QGraphicsItem.__init__(self, parent)<br><br>It seems that I get the reference to the same object. I check It with print('circle '+str(circle)):
<br><br>new circle <items.Circle object at 0x00C0CF18><br>circle shutdown <items.Circle object at 0x00C0CF18><br>new circle <items.Circle object at 0x00C0CF18><br><br>and the line responsible for creating the item is as follows:
<br>c = Circle(self._nextRadius(item.getMenuItems()), item.getMenuItems(), self)<br><br>How is this possible?<br><br>Have to mention that with the same implementation I didn't have that problem using older version of Qt + PyQt.
<br><br>Best Regards,<br>Krystian<br>