Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.8.0
-
None
Description
During some recent development, I made an error in exposing a class hierarchy to Qml. I essentially defined:
class BaseFoo { }
class MyFoo : public BaseFoo {}
class Bar
{ Q_PROPERTY(QQmlListProperty<BaseFoo> foos READ foos) }In my startup code I did qmlRegisterType on Bar and MyFoo but forgot to do it on BaseFoo. The problem is, the reported error message upon parsing a QML file and trying to define 'foos' was:
Test.qml:4 Invalid property assignment: \"foos\" is a read-only property\n
While it's reasonable that the code failed, the error message is highly confusing.