Trouble: QWebView with local html which includes local javascript
I am developing an application wich loads a local html inside a QWebView
in this way:
ui->webView->setUrl(QUrl("qrc:/index.html"));
and the page is correctly loaded but not the javascript. Here the html:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="utils.js"></script>
</head>
<body>
<input type="button" value="test" onclick="test_func();"/>
</body>
</html>
so, in utils.js I have test_func() but it does not work.
Any idea? Thanks.
No comments:
Post a Comment