Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.12.1
-
None
Description
It seems that some but not all attached properties in a ColumnLayout can be accessed by child elements, which can lead to layouts simply breaking silently.
Consider the following code:
ColumnLayout { id: column anchors.fill: parent Repeater { model: 3 delegate: Rectangle { Layout.fillWidth: true Layout.fillHeight: true color: Qt.rgba(Math.random(), Math.random(), Math.random()) Component.onCompleted: console.log("completed", column, row, maximumHeight, maximumWidth, minimumHeight, minimumWidth) } } }
An access to the ColumnLayout by its id isn't possible from inside Rectangle, since 'column' seems to refer to the attached property 'column' from ColumnLayout, which should normally be accessed though 'Layout.column'.
Example code is attached.
Attachments
Issue Links
- duplicates
-
QTBUG-70031 [5.12 QML REG] Can no longer access items named 'column' from inside a Repeater
- Closed