How can we print out what an webview contains? i tried something like :
view.page().currentFrame().toPlainText()
but it didn’t work
PS: my webview contains an evaluation of a javascript function , so i suppose toHtml() won’t do the job any suggestion?
QtWebKitwill display javascript-generated webpages exactly the same as it will display any other webpage (though you can disable js throughQWebSettings). I assume then, that you want the webpage to generate elements based on requests from the C++ application.If that’s the case, you want
QWebFrame::evaluateJavaScript(as previously stated in this previous question: Qt4: How to call JavaScript functions in a page from C++ via QtWebkit?).More generally, you might find this useful.