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. Draw interactive points on an image
Forum Updated to NodeBB v4.3 + New Features

Draw interactive points on an image

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.8k 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.
  • B Offline
    B Offline
    Bruschetta
    wrote on last edited by
    #1

    Hello guys,
    i have a set of images, all of the same size (height and width), and for each image i have a set of coordinates (x,y) rapresenting interactive points i have to draw on the selected image.
    Let's say i have image A with two points PointA(X=30 , y=60) ,PointB(X=60 , Y=10) and PointC(X=70,Y=70) like in the image i have attached:

    alt text

    Can you tell me how i could achieve my goal?With which instruments? Can you link me some examples?
    Thank you for the answers and your time

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @Bruschetta Which way are you preferring ? Qt Widgets or QML/QtQuick ?

      157

      B 1 Reply Last reply
      1
      • p3c0P p3c0

        @Bruschetta Which way are you preferring ? Qt Widgets or QML/QtQuick ?

        B Offline
        B Offline
        Bruschetta
        wrote on last edited by
        #3

        @p3c0 said in Draw interactive points on an image:

        Qt Widgets

        I would like to use Qt Widgets

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by p3c0
          #4

          @Bruschetta Ok. What do you mean by interactive here ? Are these just static or movable/draggable ?

          157

          B 1 Reply Last reply
          1
          • p3c0P p3c0

            @Bruschetta Ok. What do you mean by interactive here ? Are these just static or movable/draggable ?

            B Offline
            B Offline
            Bruschetta
            wrote on last edited by
            #5

            @p3c0
            The buttons must be static , but clickable to trigger some action (in my case select a column of a TableView).

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by p3c0
              #6

              @Bruschetta The best way would be to use the Graphics View Framework. Have a look at these classes.
              For eg. To add the image you can use QGraphicsScene and use addPixmap to draw the image.
              To draw the circles you can use QGraphicsEllipseItem. To make them clickable you can subclass it and re-implement mouseReleaseEvent and emit a signal from it.

              157

              B 1 Reply Last reply
              2
              • p3c0P p3c0

                @Bruschetta The best way would be to use the Graphics View Framework. Have a look at these classes.
                For eg. To add the image you can use QGraphicsScene and use addPixmap to draw the image.
                To draw the circles you can use QGraphicsEllipseItem. To make them clickable you can subclass it and re-implement mouseReleaseEvent and emit a signal from it.

                B Offline
                B Offline
                Bruschetta
                wrote on last edited by
                #7

                @p3c0
                Thank you for the tips.

                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