Pass DBus method call an array
-
Hi, I can't pass an array to a QDBusMessage
I tried
@
uchar a[1] = {0};
msg << a;
@But I get a "QVariant::QVariant(void *) is private" error
I've also tried
@QDBusArgument *arg=new QDBusArgument();
arg->beginArray();
arg->appendVariant(0);
arg->endArray();msg << arg;
@But I get the same error.
Thanks!
-
operator<< of QDBusMessage takes a QVariant as argument. There's no implicit conversion between an array of uchar and QVariant, that's why the compiler bails out. You will have to create a QVariant with the contents of your array.