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

Christian Rüb christian.rueb at gmx.net
Mon Aug 17 23:27:20 CEST 2009


Thiago Macieira wrote:
> 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()));

Thanks that works.

 Cheers,
 Christian





More information about the Qt-interest-old mailing list