Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15, 6.7
-
None
Description
A ColumnLayout with 0 implicit height nested in another ColumnLayout no longer get handled correctly after merging commit https://codereview.qt-project.org/c/qt/qtdeclarative/+/297828 .
Here's a minimum example to reproduce this issue:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 Window { width: 300 height: 400 visible: true ColumnLayout { anchors.left: parent.left anchors.right: parent.right Label { Layout.fillWidth: true text: "Text 1" } ColumnLayout { Layout.fillWidth: true Label { Layout.fillWidth: true text: "Sub Text" visible: showSwitch.checked } } Label { Layout.fillWidth: true text: "Text 2" } } Switch { id: showSwitch anchors.centerIn: parent text: "Show Sub Text" checked: true } }
When we uncheck the "Show Sub Text" switch, the height of nested ColumnLayout is unchanged, leaving unexpected blank between two Labels.