why FastBlur doesnt work?
Solved
General and Desktop
-
hello,
i have this simple code which doesnt work with no idea why...import QtQuick 2.12 import QtQuick.Controls 2.0 import QtQuick.Controls.Styles 1.4 import QtGraphicalEffects 1.12 Item { id: parentObject property bool screenBlured: false onSsreenBluredChanged: { console.log(screenBlured); } // works fine, upon clicking on image, this changes to true FastBlur { id: blur anchors.fill: parentObject // or should be testRect? source: parentObject // or should be testRect? radius: screenBlured===true ? 32 : 0 onRadiusChanged: { console.log(blur.radius); } // when screenBlured changes to true, this debug says "0" at the same time, even when it should say "32" Behavior on radius { NumberAnimation { duration: 500 } } } Rectangle { id: testRect anchors.fill: parent Image { id: scanImage anchors.centerIn: parent source: "images/scan.ico" MouseArea { anchors.fill: parent onClicked: { blured.screenBlured = true; } } } } }
-
Documentation clearly states:
Note: It is not supported to let the effect include itself, for instance by setting source to the effect's parent.
So you can't set the blur to fill parent object.