Unsolved Dynamic block diagram - QGraphicsView, QML ? Where to start ?
-
Hi QT Forum,
I'm revamping an old project mde by someone else where there was an area with a dynamic diagram (see image below). In other words, I could move my green blocks and connect inputs/outputs easily.Honestly, I do not know where to start. Here are my requirements :
- Dynamic edition of the diagram (drag & drop, etc).
- Blocks with inputs/outputs defined by the dev.
- "Automatic" connection.
In other words, I want something +/- similar to Labview or GNURadio (for those who know those tools).
Where should I start ? QGraphicsView ? QML stuff ?
-
Hi and welcome
What about
http://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html
It has most of what you need for such editor.for
- Blocks with inputs/outputs defined by the dev.
For this you need some spec file for each item. Maybe use xml or json for that.
I assume you already have something in place ? -
Hi mrjj,
Yes, for inputs/outputs, there is a kind of spec file (a simple .txt with inputs/outputs and a few parameters). But, it was left undocumented, Windows-only, etc. So yes, I was thinking about an XML specification file to configure my block.Thanks for your link, I'll have a look at it.
-
@Goofy
Ok. xml or json both very easy to work with in Qt.
Might be overkill though depending on the spef files complexity. -
@Goofy how did you solve the dynamic block diagram queries? Please insight on how you implemented the solutions, I am very interested in the subject. Cheers!