hi,
i've got a problem with a QGraphicsItem. I wrote a class GraphicsLine:
GraphicsLine
::GraphicsLine( int id, qreal x1, qreal y1, qreal x2, qreal y2
) : QGraphicsItem()
GraphicsLine::GraphicsLine( int id, qreal x1, qreal y1, qreal x2, qreal y2 ) : QGraphicsItem()
To copy to clipboard, switch view to plain text mode
In order to do so, i had to reimplementent boundingRect. I want each Object of GraphicsLine to change it's color to red if the mouse is hovered above it.
So far, everything works fine.
But if two lines cross each other, only the most recently painted one changes it color because it's bounding box lies above the other one.
Example attached
how can i mark all lines underneath the mouse pointer?
Bookmarks