Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is it possible to replicate/mirror the inside content of a transparent rectangle
Qt 6.12 LTS is out! See what's new in the release blog

Is it possible to replicate/mirror the inside content of a transparent rectangle

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 422 Views
  • 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.
  • A Offline
    A Offline
    Ashish_Pathak
    wrote on last edited by
    #1

    Hi all.
    i am making a zoom button program in qml.
    On how i have designed it is that I have divided my application window into 2, on the left hand side I have a image, and on top of it is a zoom button. Now, on pressing the zoom button, a transparent rectangle is generated on top of this image that gives the user the ability to drag it all over the image.
    What i am not able to achieve is to mirror the same on the right side. What i am looking forward is to crop/mirror the inside of the transparent rectangle, wheresoever i drag the rectangle on the left image, on the right i should see the content that the transparent rectangle covers, but i am not able to do it.

    Currently, I am using 5.12 version of qt.
    if anyone has a solution/alternative for the same, please do let me know.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Ashish_Pathak
      wrote on last edited by
      #2

      Hello all,
      I was able to complete the project. For this project as i required the need to replicate/mirror the area enclosed under the transparent rectangle, I made the use of ShaderEffectSource along with grabToImage which helped me to get what I was trying to achieve out of this project.

      Let me know if someone requires the code to checkout.
      Thank you!

      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
      • Unsolved