// Set the focus on the WebEngine view.
webEngineViewPointer->setFocus();
- // Load a website.
- webEngineViewPointer->setUrl(QUrl(QStringLiteral("https://www.stoutner.com/")));
+ // Load the homepage. TODO. Consider sanitizing the homepage input and adding things like protocols if they are missing.
+ webEngineViewPointer->setUrl(Settings::homepage());
}
void MainView::loadUrl(const QString &urlFromUser)
{
+ // Remove the focus from the URL line edit.
+ urlLineEditPointer->clearFocus();
+
// Load the URL, adding standard protocol sections if needed. TODO. Replace this with logic that prefers HTTPS.
webEngineViewPointer->setUrl(QUrl::fromUserInput(urlFromUser));
}