def hoverEnterEvent(self, mouseEvent): QGraphicsPolygonItem.hoverEnterEvent(self, mouseEvent) self.toggleHighlight()