BluetoothDiscoveryModel QML Type
Enables searching for the Bluetooth devices and services in range. More...
|Import Statement:||import QtBluetooth 5.2|
- discoveryMode : enumeration
- error : enumeration
- remoteAddress : string
- running : bool
- uuidFilter : string
BluetoothDiscoveryModel provides a model of connectable services. The contents of the model can be filtered by UUID allowing discovery to be limited to a single service such as a game.
|Model role||Device Discovery||Service Discovery|
|The device's name and address.||The service name and the name of the device offering the service. If the device name is empty the devices address will be used.|
|The name of the device.||The name of the device offering the service.|
|The role is undefined in this mode.||The BluetoothService object describing the discovered service.|
|The address of the found device.||The address of the device offering the service.|
See also QBluetoothServiceDiscoveryAgent.
Sets the discovery mode. The discovery mode has to be set before the discovery is started
|Starts a full discovery of all services of all devices in range.|
|(Default) Starts a minimal discovery of all services of all devices in range. A minimal discovery is faster but only guarantees the device and UUID information to be correct.|
|Discovers only devices in range. The service role will be 0 for any model item.|
This property holds the last error reported during discovery.
|No error occurred.|
|An IO failure occurred during device discovery|
|The bluetooth device is not powered on.|
|There is no default Bluetooth device to perform the service discovery. The model always uses the local default adapter. Specifying a default adapter is not possible. If that's required, QBluetoothServiceDiscoveryAgent should be directly used. This value was introduced by Qt 5.4.|
|An unknown error occurred.|
This property is read-only.
This property holds an optional bluetooth address for a remote bluetooth device. Only services on this remote device will be discovered. It has no effect if an invalid bluetooth address was set or if the property was set after the discovery was started.
The property is ignored if device discovery is selected.
This property starts or stops discovery. A restart of the discovery process requires setting this property to
false and subsequently to
This signal is emitted when a new device is discovered. device contains the Bluetooth address of the discovered device.
The corresponding handler is
This signal is emitted when a new service is discovered. The service parameter contains the service details.
The corresponding handler is
See also BluetoothService.
© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.