def GetNodeItem(self, item: QGraphicsItem): node = None if item is not None: if item.parentItem() is not None: item = item.parentItem() for i in range(0, len(self.nodes)): if self.nodes[i].item == item: node = self.nodes[i] return node
def GetNodeItem(self, item: QGraphicsItem): node = None if item is not None: if item.parentItem() is not None: item = item.parentItem() for i in range(0, len(self.nodes)): if self.nodes[i].item == item: node = self.nodes[i] return node