I create a QFuture that I want to use to parallelize calls to a member function. More precisely, I have a class solveParallel with .h :
class solverParallel
From the official documentation :
QtConcurrent::run() also accepts pointers to member functions. The first argument must be either a const reference or a pointer to an instance of the class. Passing by const reference is useful when calling const member functions; passing by pointer is useful for calling non-const member functions that modify the instance.
You are passing a pointer to a pointer. Also notice that you cannot pass the arguments the way you do, but as extra arguments in the run
function. The following should work:
futureComput = QtConcurrent::run(this->myMgr,&Manager::compute, model);