QGraphicsView: Need event emitted when line is dropped on rectangle?
I'm building an editor (similar to MS Visio) to draw a hierarchical finite state machine. Hence I need to connect rectangles (states) with lines (transitions) in my drawing area.
I will use a drag and drop approach.
Any idea on how to have an event emitted when a line is dropped (or is connected to) on a rectangle?
Re: QGraphicsView: Need event emitted when line is dropped on rectangle?
If you mean you are moving a line item and want to check whether it currently insects with a rectangle item, see QGraphicsItem::collidesWith and QGraphicsScene::collidingItems.
Cheers,
_