This
GraphicsView
example shows how to implement edges between nodes in a graph.