#include <QDateTime> // 获取当前日期和时间 QString MyQtInterFace::GetCurTimeDate() { QString datetime = QDateTime::currentDateTime().toString("yyyy-MM-dd dddd hh:mm"); return datetime; } public: explicit MyQtInterFace(QObject *parent = nullptr); QString GetCurTimeDate(void);
标签:控件,Qt,MyQtInterFace,datetime,日期,QString,GetCurTimeDate From: https://www.cnblogs.com/lum0126/p/16889047.html