aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-02-16 12:24:00 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-02-16 14:06:09 +0000
commitabab7fd3268acc87997d2133a4ff9ba449f18331 (patch)
treed6d66cc758f7327120a56bb023012d83a88b17b0 /examples/quickcontrols2
parentd95e67c291d213cdbf41b23c535b47aa3a553ab5 (diff)
Examples: don't use anchors in layouts
Change-Id: I9130e8d143b1f6b2ac6ec2839e47858db3e67dff Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'examples/quickcontrols2')
-rw-r--r--examples/quickcontrols2/imagine/automotive/qml/automotive.qml6
-rw-r--r--examples/quickcontrols2/imagine/musicplayer/musicplayer.qml5
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/quickcontrols2/imagine/automotive/qml/automotive.qml b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
index a2985d0f..86355bb0 100644
--- a/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
+++ b/examples/quickcontrols2/imagine/automotive/qml/automotive.qml
@@ -201,8 +201,8 @@ ApplicationWindow {
value: 42
to: 100
stepSize: 1
- anchors.horizontalCenter: parent.horizontalCenter
+ Layout.alignment: Qt.AlignHCenter
Layout.minimumWidth: 64
Layout.minimumHeight: 64
Layout.preferredWidth: 128
@@ -241,8 +241,8 @@ ApplicationWindow {
font.pixelSize: fontSizeMedium * 0.8
horizontalAlignment: Label.AlignHCenter
glowEnabled: false
- anchors.bottom: radioOption.bottom
+ Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
}
GlowingLabel {
@@ -251,8 +251,8 @@ ApplicationWindow {
font.pixelSize: fontSizeMedium * 0.6
horizontalAlignment: Label.AlignRight
glowEnabled: false
- anchors.bottom: radioOption.bottom
+ Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
}
}
diff --git a/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml b/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml
index 84084862..f772fa42 100644
--- a/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml
+++ b/examples/quickcontrols2/imagine/musicplayer/musicplayer.qml
@@ -188,15 +188,14 @@ ApplicationWindow {
}
Dial {
- anchors.horizontalCenter: parent.horizontalCenter
-
+ Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 50
}
Label {
text: "Volume"
- anchors.horizontalCenter: parent.horizontalCenter
+ Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 12
}
}