aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/pages/ButtonPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/ButtonPage.qml')
-rw-r--r--examples/quickcontrols2/gallery/pages/ButtonPage.qml67
1 files changed, 29 insertions, 38 deletions
diff --git a/examples/quickcontrols2/gallery/pages/ButtonPage.qml b/examples/quickcontrols2/gallery/pages/ButtonPage.qml
index 4ac657d2..add29e83 100644
--- a/examples/quickcontrols2/gallery/pages/ButtonPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ButtonPage.qml
@@ -39,53 +39,44 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-Flickable {
- id: flickable
- contentHeight: pane.height
+ScrollablePage {
+ id: page
- readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, pane.availableWidth / 3))
+ readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, page.availableWidth / 3))
- Pane {
- id: pane
+ Column {
+ spacing: 40
width: parent.width
- Column {
- id: column
- spacing: 40
+ Label {
width: parent.width
+ wrapMode: Label.Wrap
+ horizontalAlignment: Qt.AlignHCenter
+ text: "Button presents a push-button that can be pushed or clicked by the user. "
+ + "Buttons are normally used to perform an action, or to answer a question."
+ }
- Label {
- width: parent.width
- wrapMode: Label.Wrap
- horizontalAlignment: Qt.AlignHCenter
- text: "Button presents a push-button that can be pushed or clicked by the user. "
- + "Buttons are normally used to perform an action, or to answer a question."
- }
-
- Column {
- spacing: 20
- anchors.horizontalCenter: parent.horizontalCenter
+ Column {
+ spacing: 20
+ anchors.horizontalCenter: parent.horizontalCenter
- Button {
- text: "First"
- width: itemWidth
- }
- Button {
- id: button
- text: "Second"
- width: itemWidth
- highlighted: true
- }
- Button {
- text: "Third"
- enabled: false
- width: itemWidth
- }
+ Button {
+ text: "First"
+ width: itemWidth
+ }
+ Button {
+ id: button
+ text: "Second"
+ width: itemWidth
+ highlighted: true
+ }
+ Button {
+ text: "Third"
+ enabled: false
+ width: itemWidth
}
}
}
-
- ScrollIndicator.vertical: ScrollIndicator { }
}