diff options
Diffstat (limited to 'examples/webengine/quicknanobrowser/BrowserWindow.qml')
-rw-r--r-- | examples/webengine/quicknanobrowser/BrowserWindow.qml | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml index 16efc9e37..f3bd8e457 100644 --- a/examples/webengine/quicknanobrowser/BrowserWindow.qml +++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml @@ -57,7 +57,7 @@ import QtQuick.Controls.Styles 1.0 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.0 import QtQuick.Window 2.1 -import QtWebEngine 1.3 +import QtWebEngine 1.7 ApplicationWindow { id: browserWindow @@ -87,6 +87,8 @@ ApplicationWindow { property alias fullScreenSupportEnabled: fullScreenSupportEnabled.checked property alias autoLoadIconsForPage: autoLoadIconsForPage.checked property alias touchIconsEnabled: touchIconsEnabled.checked + property alias webRTCPublicInterfacesOnly : webRTCPublicInterfacesOnly.checked + property alias devToolsEnabled: devToolsEnabled.checked } Action { @@ -311,6 +313,18 @@ ApplicationWindow { checked: WebEngine.settings.touchIconsEnabled enabled: autoLoadIconsForPage.checked } + MenuItem { + id: webRTCPublicInterfacesOnly + text: "WebRTC Public Interfaces Only" + checkable: true + checked: WebEngine.settings.webRTCPublicInterfacesOnly + } + MenuItem { + id: devToolsEnabled + text: "Open DevTools" + checkable: true + checked: false + } } } } @@ -384,6 +398,7 @@ ApplicationWindow { settings.fullScreenSupportEnabled: appSettings.fullScreenSupportEnabled settings.autoLoadIconsForPage: appSettings.autoLoadIconsForPage settings.touchIconsEnabled: appSettings.touchIconsEnabled + settings.webRTCPublicInterfacesOnly: appSettings.webRTCPublicInterfacesOnly onCertificateError: { error.defer(); @@ -423,6 +438,13 @@ ApplicationWindow { request.accept(); } + onQuotaPermissionRequested: { + if (request.requestedSize <= 5 * 1024 * 1024) + request.accept(); + else + request.reject(); + } + onRenderProcessTerminated: { var status = ""; switch (terminationStatus) { @@ -461,6 +483,15 @@ ApplicationWindow { } } } + WebEngineView { + id: devToolsView + visible: devToolsEnabled.checked + height: 400 + inspectedView: tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + } MessageDialog { id: sslDialog |