Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.10.0
-
None
Description
When adding a RowLayout directly to a ColumnLayout via a Repeater, at least Layout.fillWidth is ignored on the RowLayout items.
Which seems a bug. In comparison, when creating the RowLayout via a Loader the property Layout.fillWidth works. The property Layout.fillWidth also works if adding a Item directly via a Repeater.
Showcase:
import QtQuick 2.9 import QtQuick.Layouts 1.3 ColumnLayout { id: root property var someModel: [ "A" ] width: 800 Repeater { model: root.someModel delegate: Item { Layout.fillWidth: true Text { anchors.centerIn: parent text: "With Item: Takes the whole width" } } } Repeater { model: root.someModel delegate: RowLayout { Layout.fillWidth: true Text { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter text: "With RowLayout: Does not take the whole width" } } } Repeater { model: root.someModel delegate: Loader { Layout.fillWidth: item.Layout.fillWidth sourceComponent: RowLayout { Layout.fillWidth: true Text { Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter text: "With Loader and RowLayout: takes the whole width" } } } } }