while{
....
....
}
我想让QTableWidget显示内容后延时一下,因为是在循环中,不延时一下就输完全部内容了,有什么办法可以延时。
------解决方案--------------------
I wrote a super simple delay function for an application I developed in Qt.
I would advice u to use this code against sleep function as it won't let ur GUI to freeze.
void delay()
{
QTime dieTime= QTime::currentTime().addSecs(1);
while( QTime::currentTime() < dieTime )
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}
http://stackoverflow.com/questions/3752742/how-do-i-create-a-pause-wait-function-using-qt