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. Guidance needed to create a graph for which I should be able to rearrange the nodes.

Guidance needed to create a graph for which I should be able to rearrange the nodes.

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.1k Views 2 Watching
  • 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.
  • M Offline
    M Offline
    MiniMe
    wrote on last edited by MiniMe
    #1

    I need to create something like this

    https://www.youtube.com/watch?v=OHdc-wtSmg0

    I would like to be able to represent graphs like the one in the clip indicated above and to be able to re arrange the nodes using the mouse. That zoom that you see in the clip is not a must

    This would be my first attempt to work with Graphics in Qt. Can anybody point me to some tutorials or examples relevant to my task?

    note: I am a PyQt user

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The Elastic Nodes Example might be an interesting starting point. You should also look at the other Graphics View Framework examples.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MiniMe
        wrote on last edited by
        #3

        Thanks a lot! That really helped
        If anyone else is interested here are two examples

        https://gist.github.com/reusee/2406975
        http://ftp.ics.uci.edu/pub/centos0/ics-custom-build/BUILD/PyQt-x11-gpl-4.7.2/examples/graphicsview/elasticnodes.py <--laks the edges but if you move the nodes they stick to that position. The first example has edges but when you move a node it moves the other connected nodes too

        1 Reply Last reply
        2
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Since you have the information you were looking for, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MiniMe
            wrote on last edited by
            #5

            Done! Thanks again

            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