Create application to build diagrams



  • Hello,

    I'm trying to build an application that must have a work panel containing some images (in SVG format); they represent some pieces, and can be dragged, connected in between, etc...

    For now, I've drwn a widget with SVG inside, by sub-classing QWidget. Now, I would ask you for some techniques to be able to drag, drop, connect with lines and all this stuff with these items that are inside it. I am a bit lost, because I ve never created a such application.

    Thank you.


  • Moderators

    Investigate "Qt Graphics View Framework":https://qt-project.org/doc/qt-4.8/graphicsview.html. QML could also help you here.


  • Moderators

    don't you think that such a application is too much for your current skills then? I think when we start helping you we would end up writing the application for you...

    You should check out the resources on the web for drag-n-drop and QGraphicsView i would say. Then make a rough overview of the concept and how you could implement each feature with the given technology. Then connect each piece with each other.



  • Also check the examples in QtCreator for this! Use this as basis for a demo app and combine these pieces of information to a newly designed app.
    Greetz



  • Thank you all for your fast replies. I just wanted a starting point in order to start in the best way; from here, try asking more specific questions about the implementation im making =), i promise



  • This thread might be useful:
    http://qt-project.org/forums/viewthread/23246/#115372

    Also, I tried something similar and was able to draw a line connecting 2 points (even after dragging them around) in QML + JS code, by means of the Canvas element in QtQuick 2.



  • Just in case it's (even marginally) useful, I uploaded the proof of concept (and full of commented code which was a Work In Progress) line connection code which I just talked about:

    https://github.com/juannm/playground/tree/master/GraphEd


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.