summaryrefslogtreecommitdiffstats
path: root/examples/qmlsurface
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-10-01 14:02:32 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-10-01 14:10:25 +0300
commit6a85b7fa00626c544103c48099260d7a36778686 (patch)
treebb227f5c8d4dff71b9ba9c5de42a56fd96fc29a5 /examples/qmlsurface
parent1d6a370a2c6c727e5957fa63b9a516ac0227e54d (diff)
Android QtQuick.Controls button fix
Change-Id: If72aa627515978cd30cbb159eb9a6a5dddbb8f52 Change-Id: If72aa627515978cd30cbb159eb9a6a5dddbb8f52 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/qmlsurface')
-rw-r--r--examples/qmlsurface/qml/qmlsurface/main.qml12
-rw-r--r--examples/qmlsurface/qml/qmlsurface/newbutton.qml43
-rw-r--r--examples/qmlsurface/qmlsurface.qrc1
3 files changed, 50 insertions, 6 deletions
diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml
index 2e192197..0b22d6b6 100644
--- a/examples/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/qmlsurface/qml/qmlsurface/main.qml
@@ -17,7 +17,6 @@
****************************************************************************/
import QtQuick 2.1
-import QtQuick.Controls 1.0
import com.digia.QtDataVisualization 1.0
import "."
@@ -71,8 +70,9 @@ Item {
}
}
- Button {
+ NewButton {
id: surfaceGridToggle
+ anchors.top: parent.top
anchors.left: parent.left
width: 200
text: "Show Surface Grid"
@@ -87,7 +87,7 @@ Item {
}
}
- Button {
+ NewButton {
id: smoothSurfaceToggle
anchors.top: surfaceGridToggle.bottom
width: surfaceGridToggle.width
@@ -103,7 +103,7 @@ Item {
}
}
- Button {
+ NewButton {
id: backgroundToggle
anchors.top: smoothSurfaceToggle.bottom
width: smoothSurfaceToggle.width
@@ -119,7 +119,7 @@ Item {
}
}
- Button {
+ NewButton {
id: gridToggle
anchors.top: backgroundToggle.bottom
width: backgroundToggle.width
@@ -135,7 +135,7 @@ Item {
}
}
- Button {
+ NewButton {
id: proxyToggle
anchors.top: gridToggle.bottom
width: gridToggle.width
diff --git a/examples/qmlsurface/qml/qmlsurface/newbutton.qml b/examples/qmlsurface/qml/qmlsurface/newbutton.qml
new file mode 100644
index 00000000..895db183
--- /dev/null
+++ b/examples/qmlsurface/qml/qmlsurface/newbutton.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ height: 80
+
+ Button {
+ width: parent.width
+ height: parent.height
+ Text {
+ id: buttonText
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ onClicked: newbutton.clicked()
+ }
+}
diff --git a/examples/qmlsurface/qmlsurface.qrc b/examples/qmlsurface/qmlsurface.qrc
index 9c2e9108..d0745b94 100644
--- a/examples/qmlsurface/qmlsurface.qrc
+++ b/examples/qmlsurface/qmlsurface.qrc
@@ -2,6 +2,7 @@
<qresource prefix="/qml">
<file alias="main.qml">qml/qmlsurface/main.qml</file>
<file alias="Data.qml">qml/qmlsurface/data.qml</file>
+ <file alias="NewButton.qml">qml/qmlsurface/newbutton.qml</file>
</qresource>
<qresource prefix="/heightmaps">
<file alias="image">heightmap.png</file>