Created
March 18, 2015 20:16
-
-
Save lettergram/b5ed6c596f6e018110d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Note: javaScriptHandler * api is a variable in the MainWindow class | |
| void MainWindow::on_webView_loadProgress(int progress){ | |
| ui->urlLineEdit->setVisible(false); | |
| ui->progressBar->setValue(progress); | |
| QWebFrame * frame= ui->webView->page()->mainFrame(); | |
| if(progress == 100){ | |
| // Additional Line of code below | |
| frame->addToJavaScriptWindowObject("bridgeOperations", api); | |
| api->injectJavaScript(frame); | |
| ui->urlLineEdit->setVisible(true); | |
| ui->urlLineEdit->setText(ui->webView->url().toString()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment