Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.7
-
None
Description
Continuation of https://bugreports.qt.io/browse/QTBUG-116625
list<> properties can not be initialized with an initialProperties value of a Qt.binding magic object.
import QtQml QtObject { objectName: "root" property Component testComponent: QtObject { property list<QtObject> bug } Component.onCompleted: { let obj = testComponent.createObject(this, { bug: Qt.binding(() => []), }); print(obj, obj.bug.length, obj.bug); // Prints: QObject_QML_1 1 [null] obj = testComponent.createObject(this, { bug: Qt.binding(() => this), }); print(obj, obj.bug.length, obj.bug); // Prints: QObject_QML_1 1 [null] } }