Reputation: 102915
I think my web page has some JavaScript errors that make QWebView to not work. Is there some simple way to see JS errors while I'm running the debug build?
Upvotes: 3
Views: 1940
Reputation: 33617
Override the javaScriptConsoleMessage
function:
http://doc.qt.io/qt-5/qwebenginepage.html#javaScriptConsoleMessage
As the documentation says, the default implementation does nothing...you can dump it as debug output, or whatever. See also this article:
Redirecting JavaScript console messages in a Qt hybrid application (Internet Archive)
Upvotes: 4