1.在mainwindow.ui上添加一个label
2.在mainwindow.h和mainwindow.cpp文件下添加头文件
#include <QTimer>
#include <QDateTime>
3.在mainwindow.h下添加代码
public slots:
void time_update(void);
4.在mainwindow.cpp下添加 time_update 函数
1.在mainwindow.ui上添加一个label
2.在mainwindow.h和mainwindow.cpp文件下添加头文件
#include <QTimer>
#include <QDateTime>
3.在mainwindow.h下添加代码
public slots:
void time_update(void);
4.在mainwindow.cpp下添加 time_update 函数