Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.3.0 Beta2
Description
When using inheritance for namespaced classes that export QML related entities, the behaviour is a bit odd:
namespace model { class Person {...} class Boy : public model::Person { Q_OBJECT QML_NAMED_ELEMENT(Boy) public: Boy(QObject * parent = nullptr) : Person(parent) {} }; }
works fine, while
namespace model { class Person {...} class Girl : public Person { Q_OBJECT QML_ELEMENT public: Girl(QObject * parent = nullptr) : Person(parent) {} }; }
does not:
Warning: main.qml: Object type model::Girl is not derived from QObject or QQmlComponent Warning: main.qml:15:9: Could not compile binding for onCompleted: Type model::Girl of ??::bar with type model::Girl does not have a property shoeSize for writing bar.shoeSize = 123 ^^^