Details
-
Bug
-
Status: Closed
-
Not Evaluated
-
Resolution: Duplicate
-
5.15.8
-
None
-
None
Description
Hello,
When running QLowEnergyServices::discoverDetails, qt prints the following messages in the console:
QObject::connect: Cannot queue arguments of type 'QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData>' QObject::connect: Cannot queue arguments of type 'QVector<QBluetoothUuid>' QObject::connect: Cannot queue arguments of type 'QLowEnergyHandle'
And the connection never completes.
The solution I found is to add QT += bluetooth-private in the pro file, then
#include "QtBluetooth/private/qlowenergyserviceprivate_p.h" ..... qRegisterMetaType<QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData> >("QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData>"); qRegisterMetaType<QVector<QBluetoothUuid>>("QVector<QBluetoothUuid>"); qRegisterMetaType<QLowEnergyHandle>("QLowEnergyHandle");
And the the connection succeeds.
On Android I don't have any issue, I have not tested Mac and Linux.
Thanks,
Philippe Lelong
Attachments
Issue Links
- duplicates
-
QTBUG-99767 [5.15.7 -> 5.15.8] Bluetooth error: Make sure 'QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData>' is registered using qRegisterMetaType()
-
- Closed
-