summaryrefslogtreecommitdiffstats
path: root/basicsuite/webengine/ui
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-05-21 13:26:53 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-05-21 14:41:13 +0300
commit3b64133f33ccb3e8e6f429b0ade56d836687fd0a (patch)
tree3d90c6b11ca10654d98c257f3bb606019919b1b0 /basicsuite/webengine/ui
parent54ead8c42780e3cf848fbd6ce21653f6c6cff628 (diff)
webengine demo: add predefined links to page view
Change-Id: Iaca74a100d1ad105fd926af4c9f5b589330c2cb4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'basicsuite/webengine/ui')
-rw-r--r--basicsuite/webengine/ui/PageView.qml62
1 files 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