QWebPage cannot load full js staff



  • I am using QWebPage to download some page, including the js rendered content. But I found that sometimes, there is some js missing. The content which should be replaced by js rendering result remains empty.

    I check the document for QWebPage, I guess I got the answer, "Finally, the loadFinished() signal is emitted when the page contents are loaded completely, independent of script execution or page rendering."

    But how can I wait until all script rendering finish.



  • You can subclass NAM, reimplement createRequest and set it to your QWebPage, count all created requests and wait until all of them are finished.

    You will get all files loaded, but were may still exist some javascript functions which do they job continuously + javascript with dynamic content loading + ajax + json + websockets + flash... so you actually can't get really finished status, because Web 2.0 is dynamic.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.