How can I display an interactive family tree-style graph in PyQt6?
-
For context, my intention is to create an expandable/collapsible horizontal visualization of interlinked documents using a tree diagram that looks very similar this, where the documents spread outward from a single root and contain unqiue index numbers as well as possible descriptions which should be displayed below and inside the rectangular nodes, respectively. There should also be special handling for links that loop back to earlier spots on the tree, without drawing lines all the way back there (perhaps displaying those nodes in a different color).
This is the closest thing I've found to what I'm looking for in the documentation, but it has a vertical structure and doesn't meet my visualization requirements.
I've also been experimenting with Graphviz, but the image output isn't interactive and I haven't figured out how to make the structure horizontal, so I'm not sure if it will suit my needs.
-
Hi and welcome to devnet,
One thing you could use is QTransposeProxyModel to turn the model 90 degrees. However it will likely not show things as you want.
The second option is for you to implement your own view that draws cells the way you want.