QFutureWatcher how to watch multiple tasks/futures and finished() signals
<p>I have some tasks, started with <code>QtConcurrent::run()</code>.
Tasks has <code>QFutureWatcher</code>. I know that <code>QFutureWatcher</code> can watch <strong>only one</strong> Future, but when I started the same tasks from UI, how can I create `QFutureWatcher*  on each task? Is it :</p>



<pre><code>QFutureWatcher&lt;void&gt; *watcher = new QFutureWatcher;
watcher-&gt;setFuture(future);
QVector&lt;QFutureWatcher&lt;void&gt;*&gt; watchers;
watchers.push_back(watcher); // vector with pointers to each tasks watchers
</code></pre>

<p>or something else?
<strong>* My trouble</strong> is that I start each task from my code, but tasks executed with external DLL functions. And I have no API to stop the task. I can only wait for task is over and close task with release all related data, after I had received finished <code>QFutureWatcher</code> signal.</p>

<p>At this moment, I use two QFutureWatchers - one is watching the first runned task, another - starts if first task is not over and watching the second task with temporary watcher and <strong>temporary slot</strong> (code the same, I creates it just for receive another watcher signal with related data) until first task is over. And it watched the same code, but I must to duplicate it for waiting first task is over, because <code>QFutureWatcher</code> doesn't have queue with finished signals and related watcher.result()`s ..</p>

<p>1) Does Qt has any Queued task mechanism? or how can I catch multiple tasks futures?</p>

<p>2) <code>QtConcurrent::run</code> doesn't have cancel() slot. May I use map/mapped functions with one sequence item? Does mapped API has queued processing of tasks/finished signals? How I can realize that? Thx!</p>