Hi,

I am using Qt binding to speak with DBus, I have created interface with system bus.

Qt Code:
  1. //Now when I call QDbusMessage msg = interface.call(“ListDevices”);
  2. //It gives me the following,
  3.  
  4. qDebu() << “ msg :” << msg;
  5.  
  6. msg: QDBusMessage = (type=MethodReturn, service”:1:0”, signature=”ao”, contents=((Arguments: ao{[objectPath: /org/bluez/780/hci0/dev_00_1C_EF_44_D6_1D], [ObjectPath: /org/bluez/780/hci0/dev_00_OD_18_D1_OF_1A]) )
  7.  
  8. //Now when I try to get string from the message by using following, code got to infinite loop.
  9.  
  10. QList <QVariant> devices = msg.arguments();
  11.  
  12. QVariant (name,devices)
  13. {
  14. QString dName =name.toStringList()[0]; // code gets hang here
  15. qDebug << “Debug” << dName;
  16. }
To copy to clipboard, switch view to plain text mode 

Can Anybody help me, how to iterate this msg and find the List of devices from the message(last arguments[contents])

Your suggestion would be a great help for me…

Thanks in advance,
Nirav