I have a set of classes ClassA
, ClassB
, and ClassC
:
class ClassA : public QObject
{
Q_PROPERTY(int propertyA READ propertyA WRITE setPropertyA NOTIFY propertyAChanged)
}
class ClassB : public QObject
{
Q_PROPERTY(int propertyB READ propertyB WRITE setPropertyB NOTIFY propertyBChanged)
}
class ClassC : public ClassA, public ClassB //problem: both classes are derived from QObject
{
Q_PROPERTY(int propertyC READ propertyC WRITE setPropertyC NOTIFY propertyCChanged)
}
Each class has properties which must be accessible in Qml which means each class has to implement the QObject
class. What is the best way to implement this?
Regards