qt5 - How to get the html source of a page in Qt 5.4 - qwebengine -


Let's try to retrieve the source of a page in the new qwebengine (Qt5.4), but I Line T know what I'm doing wrong:

  HTML HTML; This- & gt; Page () - & gt; toHtml ([& amp; html] (constant custor and result) {html = result;}); QDebug () & lt; & Lt; html; // is still empty    

The first step of printf-debugging is to check whether Lambda is sometimes called: {qDebug () & lt; & Lt; "Lambda:" & lt; & Lt; result; Html = results; } . The code looks fine for me.

However, make sure that you do not exit toHtml before loadFinished , are emitted. It may fail.

Please note that toHtml is operated asynchronously if you call the html contents to toHtml callback If so, then it will not be called yet.

I recommend that you get your class which is generated by the callback when HTML is available.

Alternatively, whatever you want to do with the HTML code directly in the callback.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -