头文件:
#include <QTime>
触发函数:
void timerEvent(QTimerEvent* evt);
具体实现:
void TimeDialog::timerEvent( QTimerEvent* evt )
{
m_tTime=m_tTime.addSecs(1);
ui.label->setText(m_tTime.toString("hh:mm:ss"));
}
头文件:
#include <QTime>
void timerEvent(QTimerEvent* evt);
void TimeDialog::timerEvent( QTimerEvent* evt )
{
m_tTime=m_tTime.addSecs(1);
ui.label->setText(m_tTime.toString("hh:mm:ss"));
}