title: Update WebView content after QNetworkReply has finished
body: <p>I am loading JSON from a web service with a <code>QNetworkRequest</code> which I then put into a <code>JsonDataAccess</code> object. I can parse the JSON and everything is fine.</p>
  
  <p>But I want to format the JSON string to HTML and display it in a WebView which seems to not work from the thread that the <code>finished(QNetworkReply*)</code> signal uses, since it's supposed to be non-UI-blocking.</p>
  
  <p>However, I can add markers to a <code>MapView</code> with the very same method. But updating the <code>WebView</code> does not work. How do I get to the main thread to update the WebView?</p>
  
  <p>Here's the method (slot) I use at the moment:</p>
  
  <pre><code>void ApplicationUI::onLoadJsonFinished(QNetworkReply* reply) {
  
      JsonDataAccess jda;
      jsonData = jda.load(reply);
  
      qDebug() &lt;&lt; "Received JSON data: " &lt;&lt; jsonData;
  
      QVariant result = jsonData.value&lt;QVariantMap&gt;();
      QString addressTitle = result.toMap().value("address").toMap().value("title").toString();
  
  QObject* webViewAsQObject = root-&gt;findChild&lt;QObject*&gt;(
          QString("imprintWebViewObj"));
  if (webViewAsQObject) {
      WebView* webView = qobject_cast&lt;bb::cascades::WebView*&gt;(
              webViewAsQObject);
  
      QString html = QString("&lt;h1&gt;foo&lt;/h1&gt;");
      qDebug() &lt;&lt; "Loading html into webview: " &lt;&lt; html;
      webView-&gt;setHtml(html);
  }
  }
  </code></pre>
  
  <p>And this is the qml file:</p>
  
  <pre><code>import bb.cascades 1.2
  
  Page {
      Container {
          layout: DockLayout {
          }
          Container {
  
              Container {
                  leftPadding: 20
                  topPadding: 30
                  bottomPadding: 30
                  Label {
                      text: "Impressum"
                      textStyle.fontFamily: "Georgia"
                      textStyle.fontSize: FontSize.Large
                  }
  
                  ScrollView {
                      Container {
                          background: Color.create("#f8f8f8")
                          layout: StackLayout {
                              orientation: LayoutOrientation.TopToBottom
                          }
                          WebView {
                              id: imprintWebView
                              objectName: "imprintWebViewObj"   
                          }
  
                      }
  
                  }
  
              }
  
          } // Container Content end
  
  
      }
  
  }
  </code></pre>