Qt cross thread call <p>I have a Qt/C++ application, with the usual GUI thread, and a network thread. The network thread is using an external library, which has its own select() based event loop... so the network thread isn't using Qt's event system.</p> <p>At the moment, the network thread just emit()s signals when various events occur, such as a successful connection. I think this works okay, as the signals/slots mechanism posts the signals correctly for the GUI thread.</p> <p>Now, I need for the network thread to be able to call the GUI thread to ask questions. For example, the network thread may require the GUI thread to request put up a dialog, to request a password.</p> <p>Does anyone know a suitable mechanism for doing this?</p> <p>My current best idea is to have the network thread wait using a QWaitCondition, after emitting an object (<code>emit passwordRequestedEvent(passwordRequest);</code>. The passwordRequest object would have a handle on the particular QWaitCondition, and so can signal it when a decision has been made..</p> <p>Is this sort of thing sensible? or is there another option?</p>