Given this property in the declaration of the class Foo:
And this QML code:
I get the error:
Invalid property assignment: "bars" is a read-only property
However this is incorrect. The Q_PROPERTY only has a READ qualifier, but that is how QQmlListProperty is supposed to work (see https://doc.qt.io/qt-5/qqmllistproperty.html). Also looking at the example at https://doc.qt.io/qt-5/qtqml-referenceexamples-properties-example.html there isn't any indication of what went wrong.
I eventually found the solution to use a fully qualified namespace on the forums, at https://forum.qt.io/topic/45581/read-only-property-error-when-using-qqmllistproperty-with-custom-class-in-qml/9 .
1) Add a big fat warning to the docs about having to use fully qualified namespaces (accompanied by the error message above, so it can be found using your favorite search engine), or
2) Let the Q_PROPERTY system support QQmlListProperty without fully qualified namespaces.
I believe this is also the case with enum classes used as Q_PROPERTY's.