Solved Guidance needed to create a graph for which I should be able to rearrange the nodes.
-
I need to create something like this
https://www.youtube.com/watch?v=OHdc-wtSmg0
I would like to be able to represent graphs like the one in the clip indicated above and to be able to re arrange the nodes using the mouse. That zoom that you see in the clip is not a must
This would be my first attempt to work with Graphics in Qt. Can anybody point me to some tutorials or examples relevant to my task?
note: I am a PyQt user
-
Hi,
The Elastic Nodes Example might be an interesting starting point. You should also look at the other Graphics View Framework examples.
-
Thanks a lot! That really helped
If anyone else is interested here are two exampleshttps://gist.github.com/reusee/2406975
http://ftp.ics.uci.edu/pub/centos0/ics-custom-build/BUILD/PyQt-x11-gpl-4.7.2/examples/graphicsview/elasticnodes.py <--laks the edges but if you move the nodes they stick to that position. The first example has edges but when you move a node it moves the other connected nodes too -
You're welcome !
Since you have the information you were looking for, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
-
Done! Thanks again