PDA

View Full Version : Passing QList of custom classes using dbus



Luc4
26th May 2011, 14:15
Hi! I'm trying to pass QList of custom objects through dbus, but I'm simply getting nothing.

I've been able to pass objects of custom type MyObject, and everything seems to work fine. I read in the documentation of the class QDBusArgument that it is not necessary to implement the operator>> and operator<< if the array is a QList. So, I tried to create a signal with a QList<MyObject> as a parameter, but it seems nothing is sent (or received).

Am I misunderstanding the documentation? What can I do to pass QList's of custom objects (provided those are already marshalled)?
Thanks!

Luc4
27th May 2011, 17:20
At the end I solved manually marshalling the QList's using the method beginArray(...) of QDBusArgument. Seems to work just fine for the moment. Anyway, I'm not understanding why the documentation states it is not necessary to manually marshall QList's.