-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.3.0 Beta2
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 ^^^
| For Gerrit Dashboard: QTBUG-101141 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 525154,4 | qmltyperegistrar: prefer JSON's superClass.fullyQualifiedName | dev | qt/qtdeclarative | Status: NEW | +1 | 0 |