Qt 等待一段时间例如1s

QTime dieTime = QTime::currentTime().addMSecs(1000);
while( QTime::currentTime() < dieTime )
  QCoreApplication::processEvents(QEventLoop::AllEvents, 100);

posted @ 2017-06-06 17:42  酷熊  阅读(2191)  评论(0编辑  收藏  举报