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.

Qt Code:
  1. //original function is: bool MainWindow::myFunction(QString s);
  2.  
  3. QString dir = "Example";
  4.  
  5. QFuture<bool> future = QtConcurrent::run(this, &MainWindow::myFunction, dir);
  6.  
  7. 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