博客园 首页 私信博主 显示目录 隐藏目录 管理 动画

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

posted @ 2016-09-19 07:48  ants_double  阅读(600)  评论(0编辑  收藏  举报