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. How to create an interactive zoom lens.
Forum Updated to NodeBB v4.3 + New Features

How to create an interactive zoom lens.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 784 Views 2 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.
  • ealioneE Offline
    ealioneE Offline
    ealione
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Why not show a QImage in a QLabel?

      1 Reply Last reply
      0
      • ealioneE Offline
        ealioneE Offline
        ealione
        wrote on last edited by
        #3

        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?

        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