#ifndef SYNCHRONISABLE_H #define SYNCHRONISABLE_H #include class Synchronisable : public QObject { Q_OBJECT Q_PROPERTY(int cpt READ cpt WRITE setCpt NOTIFY cptChanged FINAL) public: explicit Synchronisable(int cpt = 0, QObject *parent = nullptr); int cpt() const; void setCpt(int newCpt); void inc(); signals: void cptChanged(int); private: int m_cpt; }; #endif // SYNCHRONISABLE_H