diff options
Diffstat (limited to 'src/settingsui/bluetooth/Bluetooth.qml')
-rw-r--r-- | src/settingsui/bluetooth/Bluetooth.qml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/settingsui/bluetooth/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml index 309f978..72b4ae6 100644 --- a/src/settingsui/bluetooth/Bluetooth.qml +++ b/src/settingsui/bluetooth/Bluetooth.qml @@ -47,6 +47,7 @@ Item { title: qsTr("Bluetooth status") Layout.fillWidth: true Layout.alignment: Qt.AlignTop + enabled: BtDevice.available RowLayout { spacing: 10 @@ -56,8 +57,19 @@ Item { } Switch { checked: BtDevice.powered - onCheckedChanged: BtDevice.powered = checked + onCheckedChanged: { + BtDevice.powered = checked + } } + + Connections { + target: BtDevice + onPoweredChanged: { + if (BtDevice.powered) + BtDevice.scanning = true + } + } + Label { text: qsTr("On") } |