yan bellavance
yan bellavance

Reputation: 4850

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

if the maximum wait time is 10 ms can i use qwaitcondition in Qt's main thread?

Upvotes: 0

Views: 902

Answers (1)

Adam W
Adam W

Reputation: 3698

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.

Upvotes: 4

Related Questions