#ifndef RESULTVIEWMODEL_H #define RESULTVIEWMODEL_H #include class ResultViewModel : public QtMvvm::ViewModel { Q_OBJECT Q_PROPERTY(QString result READ result WRITE setResult NOTIFY resultChanged) public: Q_INVOKABLE explicit ResultViewModel(QObject *parent = nullptr); QString result() const; public Q_SLOTS: void done(); void setResult(QString result); Q_SIGNALS: void resultChanged(QString result); protected: void onInit(const QVariantHash ¶ms) override; private: QString _result; }; #endif // RESULTVIEWMODEL_H