diff options
author | Friedemann Kleint <[email protected]> | 2018-02-26 10:22:05 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2018-02-26 09:43:55 +0000 |
commit | 949884153ae14724c30f17c75656aa0c6f072559 (patch) | |
tree | 9fb195f76250dd8b18421671ec43ddc029dc8be8 | |
parent | 6c9f0bfcc4bc6511686559dd87c29cfaa3e88b33 (diff) |
extras/gallery example: Use layout alignment in Dial pagev5.11.0-beta2
Replace 'anchors' by the 'Layout.alignment' attached property,
fixing numerous warnings:
qrc:/qml/gallery.qml:137:17: QML Dial: Detected anchors on an item that is part of a layout. This is undefined behavior.
qrc:/qml/gallery.qml:151:17: QML Text: Detected anchors on an item that is part of a layout. This is undefined behavior.
qrc:/qml/gallery.qml:103:17: QML Dial: Detected anchors on an item that is part of a layout. This is undefined behavior.
qrc:/qml/gallery.qml:124:17: QML Text: Detected anchors on an item that is part of a layout. This is undefined behavior.
Change-Id: Iaf5b8f16e477ecd8e7598e857de0fc16e7b53d53
Reviewed-by: Mitch Curtis <[email protected]>
-rw-r--r-- | examples/quickcontrols/extras/gallery/qml/gallery.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quickcontrols/extras/gallery/qml/gallery.qml b/examples/quickcontrols/extras/gallery/qml/gallery.qml index ae6c162d1..0f4d2b710 100644 --- a/examples/quickcontrols/extras/gallery/qml/gallery.qml +++ b/examples/quickcontrols/extras/gallery/qml/gallery.qml @@ -102,7 +102,7 @@ Window { Dial { id: volumeDial - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignCenter Layout.fillWidth: true Layout.fillHeight: true @@ -124,7 +124,7 @@ Window { ControlLabel { id: volumeText text: "Volume" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignCenter } } @@ -136,7 +136,7 @@ Window { Dial { id: dial2 - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignCenter Layout.fillWidth: true Layout.fillHeight: true @@ -151,7 +151,7 @@ Window { ControlLabel { id: trebleText text: "Treble" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignCenter } } } |