开发者

Can I use QwaitCondition.wait() in a slot called by the main thread?

开发者 https://www.devze.com 2022-12-19 06:02 出处:网络
if the maximum wait time is 10 ms开发者_如何学Python can i use qwaitcondition in Qt\'s main thread?Nothing stops you from using QWaitCondition in the main thread.If you are setting the wait time to 10

if the maximum wait time is 10 ms开发者_如何学Python can i use qwaitcondition in Qt's main thread?


Nothing stops you from using QWaitCondition in the main thread. If you are setting the wait time to 10ms, and it passes without unlocking you will probably not get the desired effects you want. The default is to wait indefinitely.

However, using a wait condition in the main thread will cause the GUI to become unresponsive while it waits. This is almost always undesired.

0

精彩评论

暂无评论...
验证码 换一张
取 消