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.
QtWS25 Last Chance

How to make minimap in Qt.

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.1k 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.
  • Z Offline
    Z Offline
    ZaKKu
    wrote on 14 Jun 2018, 19:13 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 14 Jun 2018, 19:25 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 14 Jun 2018, 19:46 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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 14 Jun 2018, 19:59 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 14 Jun 2018, 20:14 last edited by
            #5

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 14 Jun 2018, 20:16 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 14 Jun 2018, 20:26 last edited by
                #7

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

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 14 Jun 2018, 20:36 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 15 Jun 2018, 00:09
                  2
                  • S SGaist
                    14 Jun 2018, 20:36

                    The Graphics View framework might be an interesting start.

                    K Offline
                    K Offline
                    kenchan
                    wrote on 15 Jun 2018, 00:09 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

                    3/9

                    14 Jun 2018, 19:46

                    6 unread
                    • Login

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