Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.5
-
None
Description
Currently we automatically register QList<T> if T is a value type, and QQmlListProperty<T> if T is an object type.
However, the engine also happily handles QList of object types. qmllint and qmlsc/qmlcachegen should arguably not warn about them (which they do for the attached project, though qmllint only does so if warnings are enabled).
A workaround is to do
struct Helper { Q_GADGET QML_FOREIGN(QList<DataObject *>) QML_ANONYMOUS QML_SEQUENTIAL_CONTAINER(DataObject *) };
but that should most likely not be necessary.