-
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 |
| 524971,3 | moc: port from pair<> to a struct SuperClass | dev | qt/qtbase | Status: MERGED | +2 | 0 |
| 524972,4 | moc: store the FQN in JSON superClass objects | dev | qt/qtbase | Status: MERGED | +2 | 0 |
| 525179,2 | moc: port from pair<> to a struct SuperClass | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
| 525298,2 | moc: port from pair<> to a struct SuperClass | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 525626,3 | moc: port from pair<> to a struct SuperClass | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
| 534819,2 | moc: store the FQN in JSON superClass objects | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
| 535481,2 | moc: store the FQN in JSON superClass objects | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
| 535531,2 | moc: store the FQN in JSON superClass objects | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |