title: how to return an Qt object from the result of an thread (Qtfutur)
body: <p>i'm trying to load some data from a server and fill a Qt list. i want to run the dowloanding in a thread. so there is the code of:</p>
  
  <ul>
  <li><p><em>principal function</em> in the <strong>App.cpp</strong></p>
  
  <pre><code>loadInterestPlaces(QString&amp; urlInterestPlaces) {
  LoadData* Data = new LoadData(urlInterestPlaces);
  
  QFuture&lt; list &lt;InterestPlace *&gt; &gt; future = QtConcurrent::run(Data,
          &amp;LoadData::startLoading);
  
  
  
  // Invoke our onLoadingFinished slot after the loading has finished.
  bool ok = connect(&amp;m_watcher, SIGNAL(finished()), this,
          SLOT(onLoadingFinished()));
  Q_ASSERT(ok);
  Q_UNUSED(ok);
  
  // starts watching the given future
  m_watcher.setFuture(future);
  
  }
  
  void ApplicationUI::onLoadingFinished() {
  qDebug() &lt;&lt; "Loading finished";
  
  
  interestPlacesList = m_watcher.future().result();
  qDebug() &lt;&lt; "List size= " &lt;&lt; interestPlacesList.size();
  
      }
          }
  </code></pre></li>
  <li><p>the <strong>LoadData.cpp</strong> file : this is the code of the startloanding function :</p>
  
  <pre><code>std::list&lt;InterestPlace *&gt; LoadData::startLoading()
  {
  QNetworkAccessManager* netManager = new QNetworkAccessManager(this);
  
  const QUrl url(_URL);
  QNetworkRequest request(url);
  
  QNetworkReply* reply = netManager-&gt;get(request);
  
  netManager-&gt;moveToThread(this-&gt;thread());
  netManager-&gt;setParent(this);
  
  bool ok = connect(reply, SIGNAL(finished()), this, SLOT(onReplyFinished()));
  qDebug() &lt;&lt; reply-&gt;isFinished();
  Q_ASSERT(ok);
  Q_UNUSED(ok);
  
  qDebug() &lt;&lt; "load data: liste size" &lt;&lt;interestPlacesList.size();
  return interestPlacesList;
  }
  </code></pre></li>
  </ul>
  
  <p>Finally inside the SLOT  <strong>onreplyfinished</strong> i parse the data and fill the list.
  But the problem here, the QFuture is finished before the downloading so that the list is always empty.
  How could i return the list filled just after the execution of the onReplyFinished ?</p>