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. What should I use for implementing a draggable and zoomable 'surface' ?
Forum Updated to NodeBB v4.3 + New Features

What should I use for implementing a draggable and zoomable 'surface' ?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 1.2k Views 1 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
    manasij7479
    wrote on last edited by
    #1

    Hi
    I want to draw some 2D geometry in a widget and let the user interact with it in a few limited ways.
    Scaling, Translating and Rotating the whole thing interactively is needed.

    Is there some library widget I can use so I do not have to implement these manually.

    (And some scene graph support would be great, but not very important.
    For example, if I want the location of the user click irrespective of the transformations)

    "Error, no keyboard — press F1 to continue."

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex_malyu
      wrote on last edited by
      #2

      QGraphicsView seems what you are looking for.
      You can read about QGraphicsView framework at:
      "http://doc-snapshot.qt-project.org/qt5-5.4/graphicsview.html":http://doc-snapshot.qt-project.org/qt5-5.4/graphicsview.html

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

        Hi,

        Something's not clear: are you working with widgets or QML ?

        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
          manasij7479
          wrote on last edited by
          #4

          Widgets, definitely.
          I am not yet using Qt yet, just evaluating my options.
          My display (with SFML) looks like this:
          !http://s2.postimg.org/bjn97cpzt/snapshot41.png(Display)!

          I would like to implement this in Qt.
          The drawing part needs to be somewhat low level (with vertex arrays), but it should allow interaction as I described in the original post.

          "Error, no keyboard — press F1 to continue."

          1 Reply Last reply
          0
          • raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            In Qt you can create GUI with widgets (C++) or with JavaScript like language (QML).

            With QML you might get your desired result quickly, but might cost you a higher learning effort (depending on the skills you already have).

            But you can prototype with QML and switch to QWidgets later on if you reach a limit with it.
            It's also possible mix QML with widgets btw.

            --- 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
            0

            • Login

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