Yes, the Diagram Scene demo and VYM and Flo indeed use a QGraphicsView and GraphicsScene and so.
But I would like to re-use some existing widget if possible.
Regards,
Marc
Yes, the Diagram Scene demo and VYM and Flo indeed use a QGraphicsView and GraphicsScene and so.
But I would like to re-use some existing widget if possible.
Regards,
Marc
There's no doubt that QGraphicsView/Scene/Item is the preferred way to do this. You'll basically have to reimplement everything those classes already do, or a significant portion of it.
Take an hour to read through the documentation for those classes, and to look at the demos that are availalble. They're very simple to use, and will save you a great deal of time.
Hi,
I understand that.. But the drawing of the diagram is not the most important functionality of my intended application. I would rather concentrate on the other functions and use something ready-made for the diagramming.
You know, software reuse, not reinventing the weel, prioritizing features, things like that...
If no alternatives present themselves, I think I'll take a closer look at the Diagram Scene demo. Maybe I can do with what is implemented there already, and turn it into a standalone widget. Someone made an extension of the Diagram Scene demo it by the way (QDiagram).
Best regards,
Marc
I think you can find such components here:
http://www.vcreatelogic.com/products/gcf/
Hi tbscope,
The 'generic com component framework' of VCreateLogic seems to be a framework to allow different teams to collaborate on building large software applications. I don't see how this could be turned into a small widget to draw some basic charts
You are working for that company, right
Regards,
Marc
Hi,
So started making something myself. Got the basics working now : adding and deleting nodes, saving and loading (from an XML text), selecting nodes and moving them around.
For anyone interested : see the attachment.
I think it works quite nice : just an object that can be added to any graphicscene (so it doens't require its own dedicated graphics scene but handles its own functionality). Application is signalled when a node is selected.
Still so much to do : making it look much nicer, dragging nodes onto other ones to change the parent node, auto-arranging of child nodes, changing appearance node-by-node (color, font, ..), ...
Best regards,
Marc
Hi,
I would like to have a look at your attachment.
What kind of file format is this?
After unzipping what editor/viewer could be used on windows? When i open it with notepad, i see a lot of strange symbols.
Thx for filling in the obvious...but not for me obviously.
Strange... it is just a normal zip file that contains some directories with a Qt project and source code. Nothing special about it.
I can't post a message with an attachment right now. I think it has to do with the firewall settings of my router. Will post a .rar file later.
Regards,
Marc
Hi,
When I unzip it, I get a folder "Graph" with one file named "Graph", without extension.
When I unzipped that file also, I get the files you mention.
So unzipping twice works for me.
@ Marcvanriet Thanks for sharing
Too bad, you can't upload a .RAR. Here's a .ZIP again, but created with 7ZIP. Please let me know if it doesn't work.
Regards,
Marc
You're welcome.
I abandoned this little project myself, so didn't add any more functionality. There is a problem with the class in that redrawing isn't done well when you change the text of a node (when the new text is shorter), but I never found out why.
Best regards,
Marc
Bookmarks