This commit is contained in:
Yzzi
2020-08-14 20:27:22 +08:00
parent 2fed1bbb57
commit 3304a410c9
12 changed files with 1036 additions and 845 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "toptime.h"
#include <QDateTime>
topTime::topTime(QObject *parent) : QObject(parent)
{
current_time = QDateTime::currentDateTime();
str=current_time.toString("hh:mm");
timer=new QTimer(this);
connect(timer,&QTimer::timeout,this,&topTime::refresh);
timer->start(1000);
}
void topTime::refresh()
{
current_time = QDateTime::currentDateTime();
str=current_time.toString("hh:mm");
emit refreshed();
}