void CProgressDialog::sleep(int ms) { QElapsedTimer t; t.start(); while(t.elapsed()<ms) QCoreApplication::processEvents(); }