diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-10-01 14:02:32 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-10-01 14:10:25 +0300 |
commit | 6a85b7fa00626c544103c48099260d7a36778686 (patch) | |
tree | bb227f5c8d4dff71b9ba9c5de42a56fd96fc29a5 /examples | |
parent | 1d6a370a2c6c727e5957fa63b9a516ac0227e54d (diff) |
Android QtQuick.Controls button fix
Change-Id: If72aa627515978cd30cbb159eb9a6a5dddbb8f52
Change-Id: If72aa627515978cd30cbb159eb9a6a5dddbb8f52
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qmlbarchart/qml/qmlbarchart/main.qml | 3 | ||||
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/main.qml | 14 | ||||
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/newbutton.qml | 43 | ||||
-rw-r--r-- | examples/qmlscatter/qmlscatter.pro | 5 | ||||
-rw-r--r-- | examples/qmlscatter/qmlscatter.qrc | 1 | ||||
-rw-r--r-- | examples/qmlsurface/qml/qmlsurface/main.qml | 12 | ||||
-rw-r--r-- | examples/qmlsurface/qml/qmlsurface/newbutton.qml | 43 | ||||
-rw-r--r-- | examples/qmlsurface/qmlsurface.qrc | 1 |
8 files changed, 106 insertions, 16 deletions
diff --git a/examples/qmlbarchart/qml/qmlbarchart/main.qml b/examples/qmlbarchart/qml/qmlbarchart/main.qml index 8159aff8..9ad3f022 100644 --- a/examples/qmlbarchart/qml/qmlbarchart/main.qml +++ b/examples/qmlbarchart/qml/qmlbarchart/main.qml @@ -84,6 +84,7 @@ Item { id: mappingToggle anchors.bottom: parent.bottom width: tableView.width + height: 60 text: "Show Income" onClicked: { if (chartData.mapping.valueRole === "expenses") { @@ -102,6 +103,7 @@ Item { id: shadowToggle anchors.bottom: mappingToggle.top width: tableView.width + height: 60 text: "Hide Shadows" onClicked: { if (testChart.shadowQuality == Bars3D.ShadowNone) { @@ -118,6 +120,7 @@ Item { id: dataToggle anchors.bottom: shadowToggle.top width: tableView.width + height: 60 text: "Show 2010 - 2012" onClicked: { if (testChart.rowAxis.max !== 6) { diff --git a/examples/qmlscatter/qml/qmlscatter/main.qml b/examples/qmlscatter/qml/qmlscatter/main.qml index d3a650db..e533801b 100644 --- a/examples/qmlscatter/qml/qmlscatter/main.qml +++ b/examples/qmlscatter/qml/qmlscatter/main.qml @@ -17,7 +17,6 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 import com.digia.QtDataVisualization 1.0 import "." @@ -58,7 +57,7 @@ Item { } } - Button { + NewButton { id: shadowToggle width: parent.width / 6 text: "Hide Shadows" @@ -73,7 +72,7 @@ Item { } } - Button { + NewButton { id: smoothToggle width: parent.width / 6 text: "Use Smooth Dots" @@ -89,7 +88,7 @@ Item { } } - Button { + NewButton { id: cameraToggle width: parent.width / 6 text: "Change Camera Placement" @@ -103,7 +102,7 @@ Item { } } - Button { + NewButton { id: themeToggle width: parent.width / 6 text: "Change Theme" @@ -117,7 +116,7 @@ Item { } } - Button { + NewButton { id: backgroundToggle width: parent.width / 6 text: "Hide Background" @@ -132,7 +131,8 @@ Item { } } } - Button { + + NewButton { id: exitButton width: parent.width / 6 text: "Quit" diff --git a/examples/qmlscatter/qml/qmlscatter/newbutton.qml b/examples/qmlscatter/qml/qmlscatter/newbutton.qml new file mode 100644 index 00000000..895db183 --- /dev/null +++ b/examples/qmlscatter/qml/qmlscatter/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/qmlscatter/qmlscatter.pro b/examples/qmlscatter/qmlscatter.pro index 6f89fbae..b42fd239 100644 --- a/examples/qmlscatter/qmlscatter.pro +++ b/examples/qmlscatter/qmlscatter.pro @@ -2,6 +2,8 @@ error( "Couldn't find the examples.pri file!" ) } +QT += widgets + # Add more folders to ship with the application, here folder_01.source = qml/qmlscatter folder_01.target = qml @@ -13,9 +15,6 @@ QML_IMPORT_PATH = # The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp -# Installation path -# target.path = - # Please do not modify the following two lines. Required for deployment. include(qtquick2applicationviewer/qtquick2applicationviewer.pri) qtcAddDeployment() diff --git a/examples/qmlscatter/qmlscatter.qrc b/examples/qmlscatter/qmlscatter.qrc index 3746e6b3..6b77a4bc 100644 --- a/examples/qmlscatter/qmlscatter.qrc +++ b/examples/qmlscatter/qmlscatter.qrc @@ -2,5 +2,6 @@ <qresource prefix="/qml"> <file alias="main.qml">qml/qmlscatter/main.qml</file> <file alias="Data.qml">qml/qmlscatter/data.qml</file> + <file alias="NewButton.qml">qml/qmlscatter/newbutton.qml</file> </qresource> </RCC> 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> |