I need to write a terminal application that lists the available bluetooth devices nearby, here is my attempt at it:
void findDevice()
{
QBluetoothLocalDevice localDevice;
QString localDeviceName;
localDeviceName= localDevice.name();
QDebug << localDeviceName;
}
The first step I took is to print my own device name then once done that I could move on into retrieving a list of device and print them the same way. However I constantly keep getting the error:
expected unqualified-id
`QDebug << localDeviceName;
^
and dont know what seems to be the problem here.
You need to :