Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0
-
None
-
-
ee975a136 (dev), 0666759d4 (6.7), 4bffe40db (tqtc/lts-6.5)
Description
See ExampleShadow.zip for a minimal example. The position of the shadow is wrong until the window is resized. In our application we also have a "workaround" with a Timer but that is not working in the minimal example.
It looks like the resizing through the layout is a problem. When the implicit size of the Tile is near the final result (300) everything works fine. 1 was choosed here to clearly show the issue.
We use the implicit sizes in layouts to ensure the available size is used by all members of the layout uniformly independent from the content of the members.
import QtQuick import QtQuick.Controls import QtQuick.Layouts import QtQuick.Effects ApplicationWindow { id: appWindow height: 500 title: qsTr("Hello World") visible: true width: 800 RowLayout { spacing: 100 anchors { fill: parent margins: 100 } Tile { } Tile { } } component Tile: Rectangle { Layout.fillHeight: true Layout.fillWidth: true color: "lightgreen" implicitHeight: 1 implicitWidth: 1 radius: 10 layer { enabled: true effect: MultiEffect { shadowEnabled: true shadowOpacity: 1 shadowScale: 1.025 shadowVerticalOffset: 7 } } } }