Increasing the Scan time for QBluetoothDeviceDiscoveryAgent::Start()
General and Desktop
5
Posts
2
Posters
1.3k
Views
1
Watching
-
Hi,
I am trying to develop a Bluetooth Application and I am usingQBluetoothDeviceDiscoveryAgent::Start()to discover visible bluetooth devices.
It works well but my problem is that, i would like the scanning to either run for a longer period or until a user double-clicks on a device detected.By default, I think
Start()has a scan time of 10.28 seconds.I tried reading through the header files but can't seem to find any solution.
Would be please if I can be assisted.
Thank you
-
Oh ok, can you please give me an example..
connect(discov,SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)),this,SLOT(detectedDevice(QBluetoothDeviceInfo))); connect(discov, SIGNAL(finished()), discov, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)); connect(discov, SIGNAL(canceled()), this, SLOT(scanCompleted())); //Begin Device discovery discov->start();my
deviceDiscovered(QBluetoothDeviceInfo)is used to update my QTableWidget