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. How to make minimap in Qt.

How to make minimap in Qt.

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.3k 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.
  • Z Offline
    Z Offline
    ZaKKu
    wrote on last edited by
    #1

    Hi! Like in the title I want to know how to make some sort of minimap.
    The basic concept is that I want to show an image from file and drawn rectangles on it.
    Also, I want to make interactions with some of this rectangles.

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

      Hi and welcome to devnet,

      What kind of file are you talking about ?
      What are you using to show it ?

      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
      • Z Offline
        Z Offline
        ZaKKu
        wrote on last edited by ZaKKu
        #3

        By "file" I mean png or img file.
        This is what I want to accomplish:
        0_1529005508445_8dc068fb-42e8-407f-8c69-f44d6c63c2c5-image.png

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

          So have two views, one of the full image and another one like a thumbnail with additional data on it ?

          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
          1
          • Z Offline
            Z Offline
            ZaKKu
            wrote on last edited by
            #5

            Basically something like that. But how to make interactions when clicking on a specific rectangle?

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

              What should happen when you click on them ?

              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
              1
              • Z Offline
                Z Offline
                ZaKKu
                wrote on last edited by
                #7

                Idk. This could be anything for now... like calling a defined function or something.

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

                  The Graphics View framework might be an interesting start.

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

                  K 1 Reply Last reply
                  2
                  • SGaistS SGaist

                    The Graphics View framework might be an interesting start.

                    K Offline
                    K Offline
                    kenchan
                    wrote on last edited by
                    #9

                    @SGaist
                    You can do this using a custom plain QWidget which for which you can override the paint function and get all the mouse events you require.
                    As @SGaist suggests the Graphics View Framework is certainly worth looking at.

                    1 Reply Last reply
                    1

                    • Login

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