From 3b64133f33ccb3e8e6f429b0ade56d836687fd0a Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Wed, 21 May 2014 13:26:53 +0200 Subject: webengine demo: add predefined links to page view Change-Id: Iaca74a100d1ad105fd926af4c9f5b589330c2cb4 Reviewed-by: Eirik Aavitsland --- basicsuite/webengine/ui/PageView.qml | 62 ++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/basicsuite/webengine/ui/PageView.qml b/basicsuite/webengine/ui/PageView.qml index 49ed103..a7ea7a1 100644 --- a/basicsuite/webengine/ui/PageView.qml +++ b/basicsuite/webengine/ui/PageView.qml @@ -44,8 +44,11 @@ import QtQuick.Layouts 1.1 Rectangle { id: root - color: "darkgrey" + color: "#AAAAAA" visible: true + + property real fontPointSize: 12 + function show() { enabled = true opacity = 1 @@ -57,9 +60,64 @@ Rectangle { anchors { fill: parent } + ColumnLayout { + id: links + anchors { + bottom: localContent.top + horizontalCenter: parent.horizontalCenter + bottomMargin: 50 + } + Text { + text: "http://www.google.com" + font.pointSize: fontPointSize + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + Layout.fillWidth: true + Layout.preferredHeight: 60 + MouseArea { + anchors.fill: parent + onClicked: { + load(Qt.resolvedUrl(parent.text)) + hide() + } + } + } + Text { + text: "http://qt.digia.com" + font.pointSize: fontPointSize + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + Layout.fillWidth: true + Layout.preferredHeight: 60 + MouseArea { + anchors.fill: parent + onClicked: { + load(Qt.resolvedUrl(parent.text)) + hide() + } + } + } + Text { + text: "http://qt-project.org/doc/qt-5" + font.pointSize: fontPointSize + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + Layout.fillWidth: true + Layout.preferredHeight: 60 + MouseArea { + anchors.fill: parent + onClicked: { + load(Qt.resolvedUrl(parent.text)) + hide() + } + } + } + } RowLayout { + id: localContent anchors { - centerIn: root + centerIn: parent + margins: 50 } Image { sourceSize.width: 300 -- cgit v1.2.3