PDA

View Full Version : What class to use for a network diagram



ecce
4th May 2016, 19:42
I'm making a small application that analyzes networking equipment such as enterprise routers and switches. A would like a network topology diagram in the GUI as a widget, but I'm not sure what widget(s) to use and what to re-implement. Preferably the user should be able to interact with the items in the diagram (move them with the connections still attached, hover over items and so on), but a static image is fine if it's to much work. I once used a QCanvas, back in Qt3 I think, but that class seems to be gone by now.

Example of a network topology I want to draw: https://psychohistory.files.wordpress.com/2013/05/home_storage_topology_2013.png

I use PyQt5. I've looked a bit on QGraphicsView, QGraphicsScene, but I'm not sure if there's a better way? Suggestions?

anda_skoa
4th May 2016, 20:07
In a QtWidgets based application definitely QGraphicsView.

Cheers,
_