Obsolete Members for QLowEnergyController

以下成员源于类 QLowEnergyController 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(obsolete) QLowEnergyController (const QBluetoothAddress & remoteDevice , QObject * parent = Q_NULLPTR)
(obsolete) QLowEnergyController (const QBluetoothDeviceInfo & remoteDeviceInfo , QObject * parent = Q_NULLPTR)
(obsolete) QLowEnergyController (const QBluetoothAddress & remoteDevice , const QBluetoothAddress & localDevice , QObject * parent = Q_NULLPTR)

成员函数文档编制

QLowEnergyController:: QLowEnergyController (const QBluetoothAddress & remoteDevice , QObject * parent = Q_NULLPTR)

Constructs a new instance of this class with parent .

The remoteDevice must contain the address of the remote Bluetooth Low Energy device to which this object should attempt to connect later on.

The controller uses the local default Bluetooth adapter for the connection management.

QLowEnergyController:: QLowEnergyController (const QBluetoothDeviceInfo & remoteDeviceInfo , QObject * parent = Q_NULLPTR)

Constructs a new instance of this class with parent .

The remoteDeviceInfo must contain the details of the remote Bluetooth Low Energy device to which this object should attempt to connect later on.

The controller uses the local default Bluetooth adapter for the connection management.

该函数在 Qt 5.5 引入。

QLowEnergyController:: QLowEnergyController (const QBluetoothAddress & remoteDevice , const QBluetoothAddress & localDevice , QObject * parent = Q_NULLPTR)

Constructs a new instance of this class with parent .

The remoteDevice must contain the address of the remote Bluetooth Low Energy device to which this object should attempt to connect later on.

The connection is established via localDevice 。若 localDevice is invalid, the local default device is automatically selected. If localDevice specifies a local device that is not a local Bluetooth adapter, error () 被设为 InvalidBluetoothAdapterError once connectToDevice () 被调用。