def hoverEnterEvent(self, event): self.setZValue(self.zValue() + 1) return QGraphicsPathItem.hoverEnterEvent(self, event)