summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/btscanner/device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/btscanner/device.cpp')
-rw-r--r--examples/bluetooth/btscanner/device.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/bluetooth/btscanner/device.cpp b/examples/bluetooth/btscanner/device.cpp
index 1437f612..732eb371 100644
--- a/examples/bluetooth/btscanner/device.cpp
+++ b/examples/bluetooth/btscanner/device.cpp
@@ -48,12 +48,22 @@
#include <QDebug>
DeviceDiscoveryDialog::DeviceDiscoveryDialog(QWidget *parent)
-: QDialog(parent), discoveryAgent(new QBluetoothDeviceDiscoveryAgent),
- localDevice(new QBluetoothLocalDevice),
+: QDialog(parent), localDevice(new QBluetoothLocalDevice),
ui(new Ui_DeviceDiscovery)
{
ui->setupUi(this);
+ /*
+ * In case of multiple Bluetooth adapters it is possible to set adapter
+ * which will be used. Example code:
+ *
+ * QBluetoothAddress address("XX:XX:XX:XX:XX:XX");
+ * discoveryAgent = new QBluetoothDeviceDiscoveryAgent(address);
+ *
+ **/
+
+ discoveryAgent = new QBluetoothDeviceDiscoveryAgent();
+
connect(ui->inquiryType, SIGNAL(toggled(bool)), this, SLOT(setGeneralUnlimited(bool)));
connect(ui->scan, SIGNAL(clicked()), this, SLOT(startScan()));