- // Get a handle for the web engine view.
- QWebEngineView *webEngineViewPointer = mainViewUi.webEngineView;
+ // Get handles for the views.
+ urlLineEditPointer = mainViewUi.urlLineEdit;
+ webEngineViewPointer = mainViewUi.webEngineView;
+
+ // Update the webengine view from the URL line edit.
+ connect(urlLineEditPointer, SIGNAL(returnKeyPressed(const QString)), this, SLOT(loadUrl(const QString)));
+
+ // Update the URL line edit form the webengine view.
+ connect(webEngineViewPointer, SIGNAL(loadStarted()), this, SLOT(updateUrlLineEdit()));
+ connect(webEngineViewPointer, SIGNAL(loadProgress(int)), this, SLOT(updateUrlLineEdit()));
+ connect(webEngineViewPointer, SIGNAL(loadFinished(bool)), this, SLOT(updateUrlLineEdit()));