Is it possible to create clickable zones in an image with Qt (C ++)? I have an image that I want to load on Qt, and then select the clickable zone for that.
Thoughts?
You can use QGraphicsScene
, which is the QGraphicsView Can be displayed by
. Add a picture with addPixmap ()
. You can sub-class the clickable area to complete QGraphicsRectItem
and mousePressEvent ()
. Add this item to the Graphics view from the addItem ()
You setcursor ()
.
No comments:
Post a Comment