Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.4.1
-
6acf343acb (qt/qtdeclarative/dev) 6acf343acb (qt/tqtc-qtdeclarative/dev)
Description
Trying to fix unqualified access in Repeater elements, makes the warnings disappear completely. But if you're using a Loader in the same file, it breaks at runtime:
pragma ComponentBehavior: Bound import QtQuick Window { id: root width: 640 height: 480 visible: true title: qsTr("Hello World") property int count: 5 Column { Loader { sourceComponent: Item {} } Repeater { model: root.count Text { id: item required property int index text: "Item: " + item.index + "/" + root.count } } } }
That results in
qrc:/untitled/main.qml: Cannot instantiate bound component outside its creation context
. I left in the Repeater, as that was what I wanted to fix, but it's not needed to run into the message.
Attachments
For Gerrit Dashboard: QTBUG-108684 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
445104,3 | Loader: Create bound components into their creation context | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |