Quantcast
Channel: Qt DevNet forums: Qt WebKit
Viewing all articles
Browse latest Browse all 542

How to catch "window.onload" webpage event ?

$
0
0
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

Viewing all articles
Browse latest Browse all 542

Trending Articles