Hi all,
I have done an implementation of a QGraphicsView that allows me to highlight
the QGraphicsItem.

Each QGraphicsItem overwrite the following method:

Class Circle(QtGui.QGraphicsItem):
..
    def hoverEnterEvent(self, event):
        self.setHiglight() #this set the highlight color
        self.update()
    
    def hoverLeaveEvent(self, event):
        self.setColor () #this set the standard color
        self.update()

If I create a line for example in 0,0,100,100 end I pass over with the mouse
pointer the entity is highlighted correctly.
But if I create a circle in 0,0 with radius 200 I'm not able to highlight
the line ..
It seems that the boundingRect of the circle overlap the line .. there is
any way to avoid this overlapping ?

Or other smart method to do the highlight of a QGraphicsItem..?

Regards,
Matteo









_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to