mj
12th March 2012, 04:29
Hi,
Im calling a method using qt dbus, the method call returns array of integers as reply, but im not able to access the array elements.
this is my method call,
<code>
QDBusMessage reply = interface->call("ReadDbusConfigFile");
qDebug() << "reply :" << reply;
qDebug() << "reply arguments : " << reply.arguments();
qDebug() << "reply[0] :" << reply.arguments().at(0);
</code>
this is the output,
reply : QDBusMessage(type=MethodReturn, service=":1.130", signature="ai", contents=([Argument: ai {2, 4}]) )
reply arguments : (QVariant(QDBusArgument, ) )
reply[0] : QVariant(QDBusArgument, )
i want to access value inside array of intiger i.e. 2 and 4,
but using this "reply.arguments().at(0)" call im getting output as "QVariant(QDBusArgument, )"
what call i need to use to access those element.
thanks.
Im calling a method using qt dbus, the method call returns array of integers as reply, but im not able to access the array elements.
this is my method call,
<code>
QDBusMessage reply = interface->call("ReadDbusConfigFile");
qDebug() << "reply :" << reply;
qDebug() << "reply arguments : " << reply.arguments();
qDebug() << "reply[0] :" << reply.arguments().at(0);
</code>
this is the output,
reply : QDBusMessage(type=MethodReturn, service=":1.130", signature="ai", contents=([Argument: ai {2, 4}]) )
reply arguments : (QVariant(QDBusArgument, ) )
reply[0] : QVariant(QDBusArgument, )
i want to access value inside array of intiger i.e. 2 and 4,
but using this "reply.arguments().at(0)" call im getting output as "QVariant(QDBusArgument, )"
what call i need to use to access those element.
thanks.