diff options
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/SwitchPage.qml')
-rw-r--r-- | examples/quickcontrols2/gallery/pages/SwitchPage.qml | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/examples/quickcontrols2/gallery/pages/SwitchPage.qml b/examples/quickcontrols2/gallery/pages/SwitchPage.qml index 24fe5478..ccaa4e1e 100644 --- a/examples/quickcontrols2/gallery/pages/SwitchPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwitchPage.qml @@ -41,45 +41,36 @@ import QtQuick 2.6 import QtQuick.Controls 2.1 -Flickable { - id: flickable - contentHeight: pane.height +ScrollablePage { + id: page - 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: "Switch is an option button that can be dragged or toggled on or off. " + + "Switches are typically used to select between two states." + } - Label { - width: parent.width - wrapMode: Label.Wrap - horizontalAlignment: Qt.AlignHCenter - text: "Switch is an option button that can be dragged or toggled on or off. " - + "Switches are typically used to select between two states." - } - - Column { - spacing: 20 - anchors.horizontalCenter: parent.horizontalCenter + Column { + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter - Switch { - text: "First" - } - Switch { - text: "Second" - checked: true - } - Switch { - text: "Third" - enabled: false - } + Switch { + text: "First" + } + Switch { + text: "Second" + checked: true + } + Switch { + text: "Third" + enabled: false } } } - - ScrollIndicator.vertical: ScrollIndicator { } } |