QT中的定时器
作者:互联网
QTimer类
QTimer *timer = new QTimer(this) ;
timer->start(1000); //时间到就会发出个信号,&QTimer::timeout
connect(timer , &QTimer::timeout,[=](){
static int num = 1;
ui->labelshowtime->setText(QString::number(num ++));
});
标签:定时器,QT,timer,num,ui,timeout,QTimer 来源: https://www.cnblogs.com/qq376142178/p/15365689.html