diff options
author | Kimmo Ollila <kimmo.ollila@theqtcompany.com> | 2016-02-23 09:13:21 +0200 |
---|---|---|
committer | Kimmo Ollila <kimmo.ollila@theqtcompany.com> | 2016-03-02 12:51:24 +0000 |
commit | c6b5855b446c73f8a60cc3d4427fc445e0ba400d (patch) | |
tree | b57f45df2a297335392f56953410a4c3ab599a8d /src/settingsui/bluetooth/Bluetooth.qml | |
parent | f1d884b6dad5a93d7a3077b6b05d3ec7fcd9a6ea (diff) |
Migrate settings UI to use Qt Quick Controls 2
Task-number: QTEE-1057
Change-Id: I389d784241d4b68384765dfde4b572e7652eb76c
Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
Diffstat (limited to 'src/settingsui/bluetooth/Bluetooth.qml')
-rw-r--r-- | src/settingsui/bluetooth/Bluetooth.qml | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/src/settingsui/bluetooth/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml index d16bdb3..2bffe5b 100644 --- a/src/settingsui/bluetooth/Bluetooth.qml +++ b/src/settingsui/bluetooth/Bluetooth.qml @@ -33,57 +33,50 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import QtQuick 2.5 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles.Flat 1.0 as Flat -import "../common" +import QtQuick 2.6 +import QtQuick.Layouts 1.3 +import Qt.labs.controls 1.0 +import Qt.labs.controls.material 1.0 +import Qt.labs.controls.universal 1.0 import com.theqtcompany.settings.bluetooth 1.0 Item { id: root property string title: qsTr("Bluetooth Settings") - Column { - id: content + ColumnLayout { + anchors.margins: 20 anchors.fill: parent - anchors.margins: Math.round(40 * Flat.FlatStyle.scaleFactor) + id: content + spacing: 20 GroupBox { id: groupBox width: parent.width title: qsTr("Bluetooth status") Layout.fillWidth: true + Layout.alignment: Qt.AlignTop - ColumnLayout { - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) - width: parent.width - Layout.fillWidth: true - - Row { - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) - TextLabel { - id: off - text: qsTr("Off") - } - - Switch { - checked: BtDevice.powered - onCheckedChanged: BtDevice.powered = checked - } - - TextLabel { - text: qsTr("On") - } + RowLayout { + spacing: 10 + Label { + id: off + text: qsTr("Off") + } + Switch { + checked: BtDevice.powered + onCheckedChanged: BtDevice.powered = checked + } + Label { + text: qsTr("On") } } } - Discovery { id: discovery visible: BtDevice.powered - width: parent.width - height: Math.round(content.height - 100 * Flat.FlatStyle.scaleFactor) + Layout.fillWidth: true + Layout.fillHeight: true } } } |