Then you should reimplement some protected functions in your QGraphicsItems, particularly mousePressEvent, mouseMoveEvent, and mouseReleaseEvent. mousePressEvent would notify the item to draw a line (probably another QGraphicsItem), from the initial click location to mouseMoveEvent's current location. mouseReleaseEvent could call scene().itemAt() to determine which node is at the mouse release location. Something like that.




Reply With Quote

Bookmarks