title: Why does QWebFrame omit a large part of my HTML?
body: <p>I have HTML in form of a <code>QByteArray</code>, and I would like to parse it. </p>
  
  <pre><code>QWebPage webpage;
  webpage.mainFrame()-&gt;setContent(html);
  QWebElementCollection elements = webpage.mainFrame()-&gt;findAllElements("div");
  </code></pre>
  
  <p>However, it turns up empty, even though the html has plenty of <code>&lt;div&gt;</code>s.</p>
  
  <p>If I print <code>qDebug() &lt;&lt; webpage.mainFrame()-&gt;toHtml();</code> all I see is <code>"&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;"</code> anthough in <code>html</code> there is a nice big page, with header, body, tables, and contents.</p>
  
  <p>If I use <code>setHtml</code> instead of <code>setContent</code> by converting <code>html</code> to <code>QString</code>, I get a litte bit more, but not much. If I print <code>qDebug() &lt;&lt; webpage.mainFrame()-&gt;toHtml();</code> I see the header with its contents but without the stylesheets, but the body is completely omitted. It ends with <code>"...&lt;/head&gt;&lt;/html&gt;"</code></p>