Hi,
I am using QtWebKit in Qt 4.8.
I want to know that when could I execute the following Qt code to insert a javascript function for handling the “window.onload” webpage event :
webview->page()->mainFrame()->evaluateJavaScript(“window.onload = function() {alert(‘test’);};”);
Should I execute the above code when the “loadStarted()” signal of a QWebView emits ? or should it be executed at other times ?
Thanks in advance for any suggestion.
Lawrence
↧