QT and dbus - no such signal
Christian Rüb
christian.rueb at gmx.net
Sun Jan 10 19:30:49 CET 2010
> [...]
> > As you can see, the ResourceChanged signal is not listed (neither on my FR nor on my PC), but with qdbusviewer I can connect to it and receive the signal:
>
> It seems the signature is wrong.
> In a my working snippet I used (with QDBusConnection::connect):
>
> dbus->connect(OUSAGED_SERVICE,OUSAGED_PATH,OUSAGED_INTERFACE,"ResourceChanged",this,SLOT(resourceChanged(QString,bool,QVariantMap)));
>
> where resourceChanged has the following signature:
>
> void resourceChanged(QString name, bool state, QVariantMap attributes);
>
> Hoping it helps.
>
> Niko
Thanks. Using QDBusConnection did it. Using this signature (QString,bool,QVariantMap) with my dbus interface does not work though.
My struct (FSOResourceStatus) was defined as QString,bool,Map<QVariant> but did not work.
Nevertheless, using only a connection and no struct but Qt datatypes directly as you stated above does the job. But it still makes me wonder why it does not work with a QDBusInterface...
Cheers,
Christian
More information about the community
mailing list