GaussianBlur in a specific Area
Unsolved
QML and Qt Quick
-
Hi everyone,
I have a smaller Rectangle in an Image and I want this area to be blurred.
Unfortunately, I take the complete Image as the source and not just the part where the Rectangle is.How can I achieve, that only the area where the rectangle is is blurred?
import QtQuick.Controls 2.3 import QtQuick 2.10 import QtGraphicalEffects 1.0 ApplicationWindow { width: 700; height: 500 visible: true Image { id: image anchors.fill: parent source: "Sierra.jpg" } Rectangle { id: rect width: 200; height: 200 anchors.centerIn: parent } GaussianBlur { anchors.fill: rect source: image radius: 8 samples: 16 } }
-
You should be able to use
MaskedBlur
http://doc.qt.io/qt-5/qml-qtgraphicaleffects-maskedblur.html