这是Qt4.7引入的新的类,和QTime相比,它提供了更快的计算 elapsed 时间的方法。
QElapsedTimer t; t.start(); while(t.elapsed()<1000) QCoreApplication::processEvents();