samedi 11 juillet 2020

C++ and QML : object relations

I'm discovering QML. I have a class MyWindow :

class MyWindow : public QObject
{
  Q_OBJECT
  Q_PROPERTY(int nbMatch READ GetNbMatch NOTIFY matchChangedQMLL)
  Q_PROPERTY(std::vector<Match> match READ GetCalendar NOTIFY matchChangedQMLL)
  ...
}

In this object, I have an object that retrieved a set of data with different object types (class Match, Team, ...)

I want to display these information in my QML.

Does I need to make inheritence to QObject for all these classes (Match, Team, ...) ?

Thanks

Aucun commentaire:

Enregistrer un commentaire