Problem evaluating javascript source with QWebView
-
Hi,
I could use some help solving the following problem. I keep getting an error with the following code:
// HtmlWizard.cpp
QString scriptSource = "if (Wizard_OnNext != null)
wizard.nextButtonClicked.connect(Wizard_OnNext);";
ui.webView->page()->mainFrame()->evaluateJavaScript(scriptSource);Here I try to execute some javascriptcode with the function evaluateJavascript, it should never give an error. However when the javascript function Wizard_OnNext does not exist,
Qt shows an alert with the error:
"undefined:1: ReferenceError: Can't find variable: Wizard_OnNext"This is incorrect, since the syntax is correct. Does anybody know how I can solve this problem?
Thanks in advance,
Jelko