Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.0.0
-
None
-
Current Qt5 master
-
077c7eb97c822e70fdb2bfe88e3ddec46897ef6e
Description
Initially empty (as in, has no source) BorderImage that has a shader effect applied does not become visible even after adding a source.
A test case:
main.qml
import QtQuick 2.0 Item { width: 640 height: 480 BorderImage { id: image anchors.centerIn: parent property bool empty: false // <--- change to 'true' and it never becomes visible! source: empty ? "" : "test.png" property bool initial Component.onCompleted: initial = empty } ShaderEffect { id: effect anchors.fill: image property variant source: ShaderEffectSource { sourceItem: image hideSource: true } } MouseArea { anchors.fill: parent onClicked: image.empty = !image.empty Text { text: "Initially empty: " + image.initial anchors { margins: 10; left: parent.left; top: parent.top } } Text { text: "Image source: " + image.source anchors { margins: 10; left: parent.left; bottom: parent.bottom } } Text { text: "(click the background to toggle)" anchors { margins: 10; right: parent.right; bottom: parent.bottom } } } }