Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.2, 6.5.0 Beta1
-
None
-
c9b8b0611 (dev), b3f81380b (6.5), 049022370 (6.4), 6d181fc04 (dev), 518509297 (dev), 588f9fc17 (6.5), ddac1d5d6 (6.5)
Description
As a follow up to QTBUG-110315, I tried to assign the registered type to a property inside QML like
property list<Entry> entries: Foo.entries
prints
qt.core.qobject.connect: QObject::connect(QObject, QQmlDMObjectData): invalid nullptr parameter qml: {"0":null} qrc:/sandbox/main.qml:31: TypeError: Cannot read property 'status' of null
during runtime and prints
Error: main.qml:15:46: Could not compile binding for entries: cannot convert from QList<Entry*> of Foo::entries with type QList<Entry*> to QList<QObject *> of QList<QObject *>
plus the complete QML file during compilation.
Using
property var entries2: Foo.entries
instead works and contains the entries (with the drawback that it does not know what "entries" is, actually.
We had that list assignment construct in one place only, and it is easily replaceable by the same thing in C++ here. Nevertheless the sequential container behaviour feels a bit inconsistent here.
Attachments
Issue Links
- is duplicated by
-
QTBUG-110315 Accessing the length of a QML_SEQUENTIAL_CONTAINER crashes
- Closed
- resulted in
-
QTBUG-112208 Assignment to a list property emits property change event for every item in the list
- Closed