qt 计时器自动刷新图片

计时器

 1   QTimer *timer;
 2   timer->start (2000);
 3 void PictureShow::stopStartPage()
 4 {
 5     if (timer->isActive())
 6     {
 7         timer->stop();
 8     }
 9     
10     else
11     {
12         timer->start();
13     }
14 }
View Code
 connect (timer, SIGNAL (timeout()), this, SLOT (nextPage()));

 demo如下:

http://url.cn/28SNGJh

原文地址:https://www.cnblogs.com/ants_double/p/5883777.html