Use
[code]=c
[/code]DiscoveryAgent=new QBluetoothDeviceDiscoveryAgent ();
DiscoveryAgent - & gt; SetLowEnergyDiscoveryTimeout (5000);//sets the BLE search time
//if I found the info describe the bluetooth device signal this to action
The connect (discoveryAgent, SIGNAL (deviceDiscovered (QBluetoothDeviceInfo)), and this, SLOT (addBlueToothDevicesToList (QBluetoothDeviceInfo)));
//signal to finish
The connect (discoveryAgent, SIGNAL (finished ()), and this, SLOT (DiscoveryFinish ()));
The connect (discoveryAgent, SIGNAL (error (QBluetoothDeviceDiscoveryAgent: : error)), and this, SLOT (DiscoveryError (QBluetoothDeviceDiscoveryAgent: : error)));
//on DiscoveryFinish callback to judge whether connection device is not connected to the search
Void BeaconBluetooth: : DiscoveryFinish ()
{
QDebug () & lt; <"DiscoveryFinish";
//not find restart
If (m_controller==NULL)
{
QDebug () & lt; <"DiscoveryFinish1";
DiscoveryAgent - & gt; Start (QBluetoothDeviceDiscoveryAgent: : LowEnergyMethod);
//resNewDiscoveryTimer - & gt; Start (10);
}
The else
{
QDebug () & lt; <"DiscoveryFinish" & lt;
{
if (! DiscoveryTimer - & gt; IsActive ())
{
CountDiscoveryTime=0;
DiscoveryTimer - & gt; Start (1000);
}
}
}
QDebug () & lt; <"DiscoveryFinish2";
}
Onecoreuap \ drivers \ WDM/bluetooth/user/winrt \ common \ bluetoothutilities CPP (509) \ Windows Devices. Bluetooth. DLL! 00007 ffea799a481: caller: 00007 ffea79aa4c0 ReturnHr (15) dar (ABC) can't find the 80070490 elements,
0 x00007ffe773d52ba (Qt5Bluetoothd. DLL) (located in ServerMiddleware. Exe) caused by abnormal: 0 xc0000005: while reading position 0 XFFFFFFFFFFFFFFFF access conflict,
Is the source of the debug mode collapse in Qt5Bluetoothd. DLL
CodePudding user response:
If the next time the next to search time to extend the collapse will be delayed for a long time but it will collapse