1.QTimer *t = new QTimer( myObject );QTimer *timer = new QTimer( myObject );
connect( timer, SIGNAL(timeout()), myObject, SLOT(timerDone()) );
timer->start( 2000, TRUE ); // 2秒單觸發(fā)定時器
connect( t, SIGNAL(timeout()), SLOT(processOneThing()) );
t->start( 2000, FALSE ); // 2秒單觸發(fā)定時器
2.void QTimer::singleShot ( int msec, QObject * receiver, const char * member ) [靜態(tài)]
QTimer::singleShot( 10*60*1000, &a, SLOT(quit()) );
| 只有注冊用戶登錄后才能發(fā)表評論。 | ||
|
||
|
相關(guān)文章:
|
||
網(wǎng)站導(dǎo)航:
博客園
IT新聞
BlogJava
博問
Chat2DB
管理
|
||
|
|

