Use callback style to start a worker thread and receive result in Qt
This answer seems to be what you are looking for. I copy it here for reference:

There is this library that is highly integrated with Qt and implements javascript-like promises:

https://github.com/juangburgos/QDeferred

It allows to create a thread-safe async API as follows:

multiplyNumbersInThread(3, 4)
.fail([](int res) {
    Q_UNUSED(res);
    qDebug() &lt;&lt; "multiplyPositiveNumbers failed!";
})
.done([](int res) {
    qDebug() &lt;&lt; "multiplyPositiveNumbers succeded! Result :" &lt;&lt; res;
});