Thursday 15 July 2010

c++ - Clickable zone in an image with Qt? -


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 () .

can also set a separate cursor for the clickable area

No comments:

Post a Comment