Draw interactive points on an image
-
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: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 -
@Bruschetta Which way are you preferring ? Qt Widgets or QML/QtQuick ?
-
-
@Bruschetta Ok. What do you mean by interactive here ? Are these just static or movable/draggable ?
-
@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 useQGraphicsScene
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.