#include <QTime>

void MainWindow::Sleep(unsigned int msec)
{
QTime reachTime=QTime::currentTime().addMSecs(msec);
while(QTime::currentTime()<reachTime)
{
QCoreApplication::processEvents(QEventLoop::AllEvents,);
} }
04-13 12:53