Maybe there is an easier way: QIODevice, the base class of QProcess has a waitForReadyRead() function that can be used to blockingly wait for the readyRead() signal emit.
Alternatively you could start the thread's event loop when you "wait" and stop it when you are done
Qt Code:
void get_something() { // wait in event loop exec(); } void set_something() { // stop event loop quit(); }To copy to clipboard, switch view to plain text mode
And for completeness: the "missing" function in your original code is QThread::eventDispatcher().
Cheers,
_
Bookmarks