title: How do I convert data from QDBusMessage in a Qt DBus call to a QString c++
body: <p>In the code below I am getting info about my cell modem. The result is the data that I expect. Now I need to convert &quot;result&quot; to a QString so I can process the data and get the object path or just extract the Object Path directly. I have tried various ways to convert result but they either throw a unable to convert qdbusmessage error or return a empty string. Can anyone point me in the right direction. Thanks in advance</p>
  <pre><code>  QDBusInterface interface( &quot;org.ofono&quot;,
                                  &quot;/&quot;,
                                  &quot;org.ofono.Manager&quot;,
                                  QDBusConnection::systemBus() );
  
        QDBusMessage result = interface.call( &quot;GetModems&quot;);
     qDebug() &lt;&lt; &quot;we got a&quot; &lt;&lt; result ;
  //the last thing I tried was
  QString eventReceivedName= result.arguments().at(0).value&lt;QString&gt;();//makes a empty string
  </code></pre>
  <p>This is the output from qDebug and it is what I am expecting.</p>
  <pre><code>QDBusMessage(type=MethodReturn, service=&quot;:1.4&quot;, signature=&quot;a(oa{sv})&quot;, contents=([Argument: a(oa{sv}) {[Argument: (oa{sv}) [ObjectPath: /hfp/org/bluez/hci0/dev_XX_0D_XX_81_XX_98], [Argument: a{sv} {&quot;Online&quot; = [Variant(bool): false], &quot;Powered&quot; = [Variant(bool): false], &quot;Lockdown&quot; = [Variant(bool): false], &quot;Emergency&quot; = [Variant(bool): false], &quot;Interfaces&quot; = [Variant(QStringList): {}], &quot;Features&quot; = [Variant(QStringList): {}], &quot;Name&quot; = [Variant(QString): &quot;moto g power&quot;], &quot;Type&quot; = [Variant(QString): &quot;hfp&quot;]}]]}]) )
  </code></pre>