I am trying to make a selectable rectangle inside an image.
Image {
id: image
Rectangle { //full-transparent like a viewport
id: rect
}
}
which looks like using the screenshot, the area which you select is full-transparent, but the rest is semi-transparent(or blur).
I found opacitymask which is a little bit similar, but I want the rest of the area shows semi-transparent, not just white.
The complete code of this project: https://github.com/arkceajin/QtDemos/tree/master/CropBox

For these cases you must use ShaderEffect:
Output: