diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2019-02-18 17:56:56 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2019-02-22 16:32:20 +0000 |
commit | d2ff59ffb4967eb34a04133ce9090da9499d4ff1 (patch) | |
tree | 96674420a1eb25a2ea48d74b319a9855fb24ab69 /examples/webengine | |
parent | 228ba503b7c5474759fe3254210c3713665c2e9c (diff) |
Add a setting to control if the PDF viewer is enabled
[ChangeLog] Introduces a setting to control if the internal PDF viewer
is enabled. By default, PDF documents will now be opened in the viewer
instead of being downloaded.
Change-Id: I78b3b3702ae3be3da58c9635720ba861db3de661
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webengine')
-rw-r--r-- | examples/webengine/quicknanobrowser/BrowserWindow.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml index c0cb4283f..94e7ac37a 100644 --- a/examples/webengine/quicknanobrowser/BrowserWindow.qml +++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml @@ -89,6 +89,7 @@ ApplicationWindow { property alias touchIconsEnabled: touchIconsEnabled.checked property alias webRTCPublicInterfacesOnly : webRTCPublicInterfacesOnly.checked property alias devToolsEnabled: devToolsEnabled.checked + property alias pdfViewerEnabled: pdfViewerEnabled.checked } Action { @@ -333,6 +334,12 @@ ApplicationWindow { checkable: true checked: false } + MenuItem { + id: pdfViewerEnabled + text: "PDF viewer enabled" + checkable: true + checked: WebEngine.settings.pdfViewerEnabled + } } } } @@ -410,6 +417,7 @@ ApplicationWindow { settings.autoLoadIconsForPage: appSettings.autoLoadIconsForPage settings.touchIconsEnabled: appSettings.touchIconsEnabled settings.webRTCPublicInterfacesOnly: appSettings.webRTCPublicInterfacesOnly + settings.pdfViewerEnabled: appSettings.pdfViewerEnabled onCertificateError: function(error) { error.defer(); |