[Qt-interest] How to use QDBusObjectPath as argument to dbus call

Thiago Macieira thiago.macieira at trolltech.com
Mon Aug 17 18:25:37 CEST 2009


Christian Rüb wrote:
>                QDBusReply<QDBusObjectPath> instancePath =
> navitInterface.call(QString("get_navit"), reply.value());

You need to place the QDBusObjectPath in a QVariant. Since QVariant only 
has constructors for the QtCore builtin types, you need to use 
qVariantFromValue:

QDBusReply<QDBusObjectPath> instancePath = 
navitInterface.call(QString("get_navit"), 
qVariantFromValue(reply.value()));
-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Development Frameworks
     Sandakerveien 116, NO-0402 Oslo, Norway

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090817/afa23619/attachment.bin 


More information about the Qt-interest-old mailing list