|
caiwei_cs 发表于 2014-5-12 22:22
恩,谢谢啦。我对qt的时间和消息还没有看到。但是比照ucos的,应该可以模糊理解。 ...
嗯,Qt的Assistant中写的挺详细的,只是英文的而异。我复制过来一些。
void QCoreApplication::processEvents ( QEventLoop:rocessEventsFlags flags = QEventLoop::AllEvents ) [static]
Processes all pending events for the calling thread according to the specified flags until there are no more events to process.
You can call this function occasionally when your program is busy performing a long operation (e.g. copying a file).
In event you are running a local loop which calls this function continuously, without an event loop, the DeferredDelete events will not be processed. This can affect the behaviour of widgets, e.g. QToolTip, that rely on DeferredDelete events to function properly. An alternative would be to call sendPostedEvents() from within that local loop. |
|