Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Create application to build diagrams

    General and Desktop
    5
    7
    1373
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Rhadel last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

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

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • raven-worx
          raven-worx Moderators last edited by

          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.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply Reply Quote 0
          • Jeroentjehome
            Jeroentjehome last edited by

            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

            Greetz, Jeroen

            1 Reply Last reply Reply Quote 0
            • R
              Rhadel last edited by

              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

              1 Reply Last reply Reply Quote 0
              • j1elo
                j1elo last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • j1elo
                  j1elo last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post