diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-24 15:16:17 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-24 16:26:58 +0100 |
commit | f30405cf4804a4b315698b7fcf53a5f583163f44 (patch) | |
tree | 046e66146fcf4470218ee9b066a8250540edb87d | |
parent | 85d5f57ebe5ee44a9171cae2c8141d6ed2a0f979 (diff) |
Fix the window title of the example.
Wire the window title to QWebView and set the application display
name. Qt will then automatically append it.
Change-Id: I327f0baa9ad5272691d84fd7eee3754b514daee6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
-rw-r--r-- | examples/webview/minibrowser/main.cpp | 4 | ||||
-rw-r--r-- | examples/webview/minibrowser/main.qml | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/webview/minibrowser/main.cpp b/examples/webview/minibrowser/main.cpp index 4598b3f..1db0bc0 100644 --- a/examples/webview/minibrowser/main.cpp +++ b/examples/webview/minibrowser/main.cpp @@ -72,12 +72,14 @@ QUrl Utils::fromUserInput(const QString& userInput) int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); + QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", + "QtWebView Example")); #ifdef QT_WEBVIEW_WEBENGINE_BACKEND QtWebEngine::initialize(); #endif // QT_WEBVIEW_WEBENGINE_BACKEND QCommandLineParser parser; QCoreApplication::setApplicationVersion(QT_VERSION_STR); - parser.setApplicationDescription("QtWebView Browser Example"); + parser.setApplicationDescription(QGuiApplication::applicationDisplayName()); parser.addHelpOption(); parser.addVersionOption(); parser.addPositionalArgument("url", "The initial URL to open."); diff --git a/examples/webview/minibrowser/main.qml b/examples/webview/minibrowser/main.qml index 728323f..89f918d 100644 --- a/examples/webview/minibrowser/main.qml +++ b/examples/webview/minibrowser/main.qml @@ -49,7 +49,7 @@ ApplicationWindow { y: initialY width: initialWidth height: initialHeight - title: qsTr("QtWebView Example") + title: webView.title toolBar: ToolBar { id: navigationBar |