In following simple code , when I try to get path()[msg.path()]. it gives null string.

It should give a object path from the received message.

Qt Code:
  1. QDBusConnection conn = QDBusConnection::systemBus();
  2.  
  3. int main(int argc, char **argv)
  4. {
  5. QCoreApplication app(argc, argv);
  6. QDBusInterface interface("org.bluez", "/org/bluez/806/hci0", "org.bluez.Adapter" , conn,0);
  7.  
  8. qDebug() << "Isvalid - "<< interface.isValid();
  9.  
  10.  
  11. msg = interface.call("DefaultAdapter"); // this will return a object path
  12.  
  13. qDebus() << "Path = " << msg.path(); // returns NULL string
  14. a.exec();
  15. }
To copy to clipboard, switch view to plain text mode 

How to find the Object Path from the received QDBusMessage object

Your suggestion would be a great help for me.