qt asynchronous completion for object member

82 Views Asked by At

I have a QObject class processing requests. So I could create a SLOT process(QString). I would like to know when the request was processed - i.e. receive a future of some kind that I can wait for. It should be possible to relate reults to corresponding requests.

But since the SLOT can't return a value, I'm a bit stuck... Can this be achieved with the Qt SIGNAL/SLOT mechanism?

1

There are 1 best solutions below

4
On

Your slot can emit a signal when it is done (with any data you need as arguments) that you can then connect to, to do other stuff at that point.