How to create an interactive zoom lens.

  • I am using a QGraphicsView to display an image.
    What I want to achieve is when a user hovers above the image, instead of seeing the mouse pointer to see a rectangular widget (something like a window) that will display a zoomed version of the pixels below.

    I am able to read the pixel values just below the mouse pointer, but what I am not sure I know how to do is what sort of a container to use for this. Would it be a good idea to use a QGraphicsView again, and make it follow the mouse coordinates, or is there a better idea.

    If you have dealt with something similar before or can imagine anything better than me, please briefly give your opinion.

    Thanks for your time.

  • Why not show a QImage in a QLabel?

  • That is what I ended up deciding to use during the weekend. I had no time to do any tests though.
    Can you use a painter inside QLabel?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.