aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery/pages/SliderPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery/pages/SliderPage.qml')
-rw-r--r--examples/quickcontrols2/gallery/pages/SliderPage.qml6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml
index d9853c22..83ae32ef 100644
--- a/examples/quickcontrols2/gallery/pages/SliderPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SliderPage.qml
@@ -39,13 +39,11 @@
****************************************************************************/
import QtQuick 2.6
-import QtQuick.Controls 2.0
+import QtQuick.Controls 2.1
ScrollablePage {
id: page
- readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, page.availableWidth / 3))
-
Column {
spacing: 40
width: parent.width
@@ -60,14 +58,12 @@ ScrollablePage {
Slider {
id: slider
value: 0.5
- width: itemWidth
anchors.horizontalCenter: parent.horizontalCenter
}
Slider {
orientation: Qt.Vertical
value: 0.5
- height: itemWidth
anchors.horizontalCenter: parent.horizontalCenter
}
}