Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using graphs in a Qt application [SOLVED]

Using graphs in a Qt application [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 5.5k Views
  • 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.
  • I Offline
    I Offline
    issam
    wrote on 13 Oct 2013, 11:06 last edited by
    #1

    Hi, I am developing a PetriNet Editor. The application will allow to construct and visualize the coverability graph of a drawn Petri Net. I used Qt containers to implement the graph algorithm but it seems very complicated.

    Is there any solution or other Qt classes to do that ?

    http://www.iissam.com/

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 14 Oct 2013, 12:19 last edited by
      #2

      Hi,

      What do you mean with

      bq. I used Qt containers to implement the graph algorithm but it seems very complicated.

      ?

      Qt containers are only data structures; the complexity of your algorithm is not depending from them.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • I Offline
        I Offline
        issam
        wrote on 14 Oct 2013, 13:19 last edited by
        #3

        Is there any tutoriel or example ?

        http://www.iissam.com/

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on 14 Oct 2013, 15:14 last edited by
          #4

          Hi,

          tutorial or example of what? PetriNet ot Qt Containers?
          For the second you can start from "here":http://qt-project.org/doc/qt-5.1/qtdoc/topics-core.html#container-classes

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • I Offline
            I Offline
            issam
            wrote on 14 Oct 2013, 21:17 last edited by
            #5

            Hi mcosta :)

            I think i will use the boost library !

            thanks :)

            http://www.iissam.com/

            1 Reply Last reply
            0
            • I Offline
              I Offline
              issam
              wrote on 9 Nov 2013, 09:26 last edited by
              #6

              Well,

              After a long research in the web I find that the best way to use handle graph in a Qt application is :

              1. The boost graph library (BGL) to create and manipulate graphs and to output (serialize) a graph as a DOT file (graph.dot)
              2. The cgraph (GraphViz) library to parse the DOT file and create a graph layout.
              3. the Qt Graphic framework to visualize the graph!

              http://www.iissam.com/

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cardfour1
                wrote on 9 Nov 2013, 13:52 last edited by
                #7

                Take a look at the following

                http://code.google.com/p/qgv/

                You don't have to write out to dot, you can go straight from your graph to cgraph and then to qt. The link has all the source code to do so. Let me know if it helps.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved