问题描述
当我激活 QTimer
要在 Qlabel
中显示时钟时遇到问题,我的小软件将使用大约 25% 到 40% 的 CPU 功率 (I3 4160),那么如何解决它更少的硬件资源?
QTimer *timer1 = new QTimer(this);
connect(timer1,SIGNAL(timeout()),this,SLOT(showtime()));
timer1->start();
这是我的 showtime() 函数
void Findlistrecord::showtime(){
QTime time = QTime::currentTime();
QString time_totext = time.toString("hh : mm : ss");
ui->timelabel->setText(time_totext);
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)