diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-03-12 18:05:04 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-19 11:14:22 +0100 |
commit | c117207e9c0b554c4f505ba01ec92e60eb15017b (patch) | |
tree | 9b730fc3c654114d637e14e3f2b941205999392d /examples/webengine/quicknanobrowser/quickwindow.qml | |
parent | 03c4a20f4c938bd901f1b89fd16d35c7367c3ecc (diff) |
Fork the quicknanobrowser as tests/quicktestbrowser
This also removed experimental API uses from the quicknanobrowser example,
which should be used mainly for documentation purposes.
The quicktestbrowser should be the one that we use from now on as a raw testbed
of new APIs.
As with other targets in the tests directory, it will only be built by default
if Qt is configured with -developer-build (and without -nomake tests).
Change-Id: Ib4461c898cd3227bbb810493daac4d841d0d8f3e
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'examples/webengine/quicknanobrowser/quickwindow.qml')
-rw-r--r-- | examples/webengine/quicknanobrowser/quickwindow.qml | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/examples/webengine/quicknanobrowser/quickwindow.qml b/examples/webengine/quicknanobrowser/quickwindow.qml index 183e41f4f..ea637e44b 100644 --- a/examples/webengine/quicknanobrowser/quickwindow.qml +++ b/examples/webengine/quicknanobrowser/quickwindow.qml @@ -40,7 +40,6 @@ import QtQuick 2.1 import QtWebEngine 1.0 -import QtWebEngine.experimental 1.0 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 import QtQuick.Layouts 1.0 @@ -52,27 +51,16 @@ ApplicationWindow { function load(url) { currentWebView.url = url } property Item currentWebView: tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null - property bool isFullScreen: visibility == Window.FullScreen - onIsFullScreenChanged: { - // This is for the case where the system forces us to leave fullscreen. - if (currentWebView) - currentWebView.state = isFullScreen ? "FullScreen" : "" - } - height: 600 width: 800 visible: true title: currentWebView && currentWebView.title - // Make sure the Qt.WindowFullscreenButtonHint is set on Mac. - Component.onCompleted: flags = flags | Qt.WindowFullscreenButtonHint - // Create a styleItem to determine the platform. // When using style "mac", ToolButtons are not supposed to accept focus. StyleItem { id: styleItem } property bool platformIsMac: styleItem.style == "mac" - Action { id: focus shortcut: "Ctrl+L" @@ -106,14 +94,6 @@ ApplicationWindow { } } - Action { - shortcut: "Escape" - onTriggered: { - if (browserWindow.isFullScreen) - browserWindow.showNormal() - } - } - toolBar: ToolBar { id: navigationBar RowLayout { @@ -196,51 +176,7 @@ ApplicationWindow { id: tabComponent WebEngineView { id: webEngineView - function adoptHandle(viewHandle) { experimental.adoptHandle(viewHandle) } - focus: true - - states: [ - State { - name: "FullScreen" - PropertyChanges { - target: tabs - frameVisible: false - tabsVisible: false - } - PropertyChanges { - target: navigationBar - visible: false - } - } - ] - - experimental { - isFullScreen: webEngineView.state == "FullScreen" && browserWindow.isFullScreen - onFullScreenRequested: { - if (fullScreen) { - webEngineView.state = "FullScreen" - browserWindow.showFullScreen(); - } else { - webEngineView.state = "" - browserWindow.showNormal(); - } - } - - onNewViewRequested: { - if (request.popup) - print("Warning: Blocked a popup window.") - else if (request.destination == WebEngineView.NewViewInTab) { - var tab = tabs.createEmptyTab() - request.openIn(tab.item) - } else { - var component = Qt.createComponent("quickwindow.qml") - var window = component.createObject() - request.openIn(window.currentWebView) - } - } - extraContextMenuEntriesComponent: ContextMenuExtras {} - } } } } |