Thank you for the help; I implemented that in my code and it works great. However, after looking through the documentation I believe the QtConcurrent::map would be better since it allows control over the timing, which I need.

I have a vector "idxvec" that has n elements, going from 0 to n. I'd like to implement the function like this:

Qt Code:
  1. vector<qint32> idxvec(nregions);
  2.  
  3. for (idx = 0; idx < nregions; idx++)
  4. idxvec[idx] = idx;
  5.  
  6. QtConcurrent::map(idxvec,this,&CoreData::runCorrelation);
To copy to clipboard, switch view to plain text mode 

However this doesn't compile. I apologize for all these questions, the documentation is really sparse about this

Thanks!