Its my first time i try to create a ui application for mobile, and also that im trying to use bluetooth
Im trying to create a harmattan application that connects and read from a device over bluetooth rfcomm.
Since all the UI should be done using qtquick, i did that.
I took the scanner.qml page from the declarative-scanner example to scan for my device and choose it.
So what i did was taking the chatclient class from the btchat example and integrating it.
now the problem:
the scanner page returns Qml BluetoothService elements, while Qt needs a QBluetoothServiceInfo object to connect a bluetooth socket to the service.
Thanks to google, i found out that Qml BluetoothService is actually backed up by a QDeclarativeBluetoothService class, which in fact contains a QBluetoothServiceInfo object and even has a method to return that pointer.
so the easy option here would be to return the BluetoothService property to Qt via parentObject->property("") , and then convert() the resulting QVariant.
Unfortunately, the source code for QDeclarativeBluetoothService is not present in the SDK, so essentially i dont have the definition, and thus cannot cast the BluetoothService to QDeclarativeBluetoothService.
also, the method i need is not Q_INVOKABLE, so i cannot use invoke().
do you have any idea how i can share the object with a QObject class in Qt?