#ifndef CURRENTTIME_H #define CURRENTTIME_H #include #include class CurrentTime : public QObject { Q_OBJECT Q_PROPERTY(QString showTime READ showTime WRITE setShowTime NOTIFY showTimeChanged) public: explicit CurrentTime(QObject *parent = nullptr); void setShowTime(const QString &showTime); private: QString m_showTime; signals: void showTimeChanged(); public slots: QString showTime(); }; #endif // CURRENTTIME_H