Esempio n. 1
0
 def itemChange(self, change, value):
     if change == QGraphicsPathItem.ItemSelectedHasChanged:
         self.setZValue(self.zValue() + (1 if value else -1))
     return QGraphicsPathItem.itemChange(self, change, value)
    def itemChange(self, change, value):
        if change == QGraphicsItem.ItemSelectedHasChanged:
            self.setPen(QPen(Qt.red if self.isSelected() else Qt.blue, 2))

        return QGraphicsPathItem.itemChange(self, change, value)
Esempio n. 3
0
 def itemChange(self, change, value):
     if change == QGraphicsPathItem.ItemSelectedHasChanged:
         self.setZValue(self.zValue() + (1 if value else -1))
     return QGraphicsPathItem.itemChange(self, change, value)
    def itemChange(self, change, value):
        if change == QGraphicsItem.ItemSelectedHasChanged:
            self.setPen(QPen(Qt.red if self.isSelected() else Qt.blue, 2))

        return QGraphicsPathItem.itemChange(self, change, value)