diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-05-20 14:17:13 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2014-05-20 16:13:39 +0300 |
commit | d2741203d3096aba2b58f340a02a8bac12a4a555 (patch) | |
tree | 6de7a26801261db6c97b878b7a77b016ae24005b /basicsuite/webengine/main.qml | |
parent | 6168bce3ae5da77cb3cf4cb0003e2d2c9db36b62 (diff) |
Add local CSS tetrahedron example and home page to webengine demo
Change-Id: I9f1db26846dc43215fc3f987e41fa177ed1f64cc
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'basicsuite/webengine/main.qml')
-rw-r--r-- | basicsuite/webengine/main.qml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/basicsuite/webengine/main.qml b/basicsuite/webengine/main.qml index 299d779..cded371 100644 --- a/basicsuite/webengine/main.qml +++ b/basicsuite/webengine/main.qml @@ -44,6 +44,8 @@ import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import QtWebEngine 0.9 +import "ui" + Rectangle { id: root z: 0 @@ -53,7 +55,8 @@ Rectangle { width: 1280 height: 800 - property url defaultUrl: "content/webgl/helloqt.html" + property url defaultUrl: "about:blank" + function load(url) { mainWebView.url = url } WebEngineView { id: mainWebView @@ -67,6 +70,15 @@ Rectangle { } } + PageView { + id: pageView + visible: true + opacity: 1 + Behavior on opacity { + NumberAnimation { duration: 250 } + } + } + MultiPointTouchArea { z: showToolBarButton.z width: parent.width @@ -164,6 +176,19 @@ Rectangle { iconSource: mainWebView.loading ? "ui/icons/process-stop.png" : "ui/icons/view-refresh.png" onClicked: mainWebView.loading ? mainWebView.stop() : mainWebView.reload() } + ToolButton { + id: homeButton + width: 20 + Layout.fillHeight: true + iconSource: pageView.opacity == 1 ? "ui/icons/window.png" : "ui/icons/home.png" + onClicked: { + if (pageView.opacity == 0) { + pageView.opacity = 1 + } else { + pageView.opacity = 0 + } + } + } TextField { id: addressBar focus: true |