Hi , all

I need compute some different data at one time ,so I use the QtConcurrent:run to

compute the data , and use QFutrueWatcher to monitor the computing state.

Here is the a section of the code.
Qt Code:
  1. **.h
  2.  
  3. QVector<QFuture<void> *> ftVec;
  4. QVector<QFutureWatcher<void> *> ftwVec;
  5.  
  6.  
  7. **.cpp
  8.  
  9. //begin a new computation.
  10. ftVec << new QFuture<void>;
  11. ftwVec << new QFutureWatcher<void>;
  12.  
  13. connect(ftwVec[num], SIGNAL(finished()),this, SLOT(getresultFunction()));
  14.  
  15. *ftVec[num] = QtConcurrent::run(this,&MainWindow::computeFuntion);
  16. ftwVec[num]->setFuture(*ftVec[num]);
  17. num++;
To copy to clipboard, switch view to plain text mode 

I want know which watcher is finished when it execute the function getresultFunction.

Give me some suggestions. Thanks..!