Hi, QtConcurrentRun sounds very good, but I try:
I call the function below from a method of the class MainWindow, so the object I provide in the fucntion si the "this" pointer.
//original function is: bool MainWindow::myFunction(QString s);
QFuture<bool> future = QtConcurrent::run(this, &MainWindow::myFunction, dir);
bool result = future.result();
//original function is: bool MainWindow::myFunction(QString s);
QString dir = "Example";
QFuture<bool> future = QtConcurrent::run(this, &MainWindow::myFunction, dir);
bool result = future.result();
To copy to clipboard, switch view to plain text mode
But it locks the program, and I need to finish it. Any idea??
Thanks
Bookmarks