Invoke and continue / return don't wait (that is purpose of multi-threading). When the thread is done let it emit a signal and wait for the model to read the data.Qt Code:
// invoke it and wait until finished QMetaObject::invokeMethod(this, "getItems", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QList<SomeDataItem>, items));To copy to clipboard, switch view to plain text mode





Reply With Quote

Bookmarks