Hello!
Suppose a class (derived from QObject) with methods such as
The class' events are processed in QThread. There are methods without returning value which may be called asynchronous. The values are needed to be given in similar way as using explicit method invocation but must not be running in caller thread.
It is unable to QMetaObject::invokeMethod with return values in queued connections. The only solution I found is declare methods like
and invoke methods in Qt::BlockingQueuedConnection. But it is not so beautiful.Qt Code:
void receiveValue(int *ret)To copy to clipboard, switch view to plain text mode
Is there another solution alike QMetaObject::invokeMethod(), but with return values and queued connections?
In addition to aesthetic, I have an academic interest in this problem.
Bookmarks