Google for the Qt "Elastic Nodes" example.