Important: Please read the Qt Code of Conduct -

[SOLVED]how to wait on multiple wait conditions/event

  • I wanted to have something similar to windows win32 api WaitForMultipleObjects call in qt. So that my calling thread can wait on mulitple events at a same time. We have QWaitCondition which can only wait for single event.

    Please guide how we can wait on multiple events

  • As per my knowledge there is no direct API available by qt to deal with such kind of scenario. How I mitigate this problem is by taking help from localserver, localclient support of qt.

    What I did is that I created one local server in my app, and the place from where I wanted to raise multiple event , there I just created a localsocket. Now I can transfer one byte of data every time when I wanted to raise an event , and this 1 byte of dtaa value will differ based on my requirement(signal type/event type).

Log in to reply