Well here is the trick
void MainWindow::on_pushButton_clicked()
{
QString code = "increment();";
ui->webView->page()->mainFrame()->evaluateJavaScript(code);
}
This will execute the JavaScript code when someone click a push button
Well you need to include a
#include <QWebFrame>
in your header file.
No comments:
Post a Comment