[Qt-interest] How to use QDBusObjectPath as argument to dbus call
Christian Rüb
christian.rueb at gmx.net
Mon Aug 17 16:43:57 CEST 2009
Hi,
I need to pass a QDBusObjectPath as argument to a dbus call, but the compiler complains and I do not know how to get around this. Just passing it as QString does not work.
code snippet:
QDBusInterface navitInterface("org.navit_project.navit", "/org/navit_project/navit","org.navit_project.navit" );
QDBusReply<QDBusObjectPath> reply = navitInterface.call( "iter" );
qDebug() << "reply:" << reply.value().path() ;
if(reply.isValid()) {
QDBusReply<QDBusObjectPath> instancePath = navitInterface.call(QString("get_navit"), reply.value());
qDebug() << "instancePath:" << instancePath.value().path();
}
gcc says: 'QString' is an inaccessible base of 'QDBusObjectPath'
This sounds reasonable, but how am I supposed to give QDBusObjectPath as argument then?
QT versions 4.4.3 and 4.5.2 tested.
Any help is appreciated.
Cheers,
Christian
More information about the Qt-interest-old
mailing list