title: How to display embedded html in Qt WebView
body: <p>I am trying to get the Qt WebView to display an html file that is embedded as a Qt resource, but I can't seem to get it to work. I created a new Qt Quick application and added a simple qml file:</p>
  
  <pre><code>import QtQuick 2.0
  import QtWebKit 3.0
  
  Rectangle {
      id: content
      width: 800
      height: 600
      color: "black"
  
      WebView {
          id: webView
          anchors.fill: parent
          url: "qrc:/res/test.html"
      }
  }
  </code></pre>
  
  <p>I then created (using the Designer) a resource file that looks like this:</p>
  
  <pre><code>&lt;RCC&gt;
      &lt;qresource prefix="/res"&gt;
          &lt;file&gt;test.html&lt;/file&gt;
      &lt;/qresource&gt;
  &lt;/RCC&gt;
  </code></pre>
  
  <p>and created a simple test.html file (in the same directory as the .qrc file):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;Hello&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The result is just a blank white window. If I use a regular url (<code>http://www.stackoverflow.com</code>) in the qml file as the url   it works - the page is displayed. If I use the name of an embedded image (<code>qrc:/qt-project.org/mac/cursors/images/pluscursor.png</code>) that image is displayed.</p>
  
  <p>It looks to me as if the html file is indeed added (it is at least listed when I enumerate the embedded resources), but my understanding of the Qt resource system is limited, so I may very well have misunderstood something fundamental.</p>
  
  <p><strong>Can anyone tell me what I am doing wrong?</strong></p>
  
  <p>Update: I have verified that the behavior is the same if I attempt to tell the web view to load the url from C++ as well. I have also verified that the resource is indeed embedded - I can open and read the resource using a QResource. Also, this does not appear to be specific to Qt5: <a href="http://qt-project.org/forums/viewthread/18181" rel="noreferrer">http://qt-project.org/forums/viewthread/18181</a> (someone having a similar problem with Qt 4.8).</p>