计时器
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 }
connect (timer, SIGNAL (timeout()), this, SLOT (nextPage()));
demo如下:
http://url.cn/28SNGJh
时间: 2024-10-12 07:26:29