howto send a reply using QDBusMessage
Hello,
I want to send a reply over DBUs before the end of my slot method. According to the QT document I have to use QDBusMessage QDBusMessage::createReply ( const QVariant & argument ) const.
Suppose I have the follow slot
How can I send a reply over the DBUS? I tried it like this
Code:
msg.createReply(v)
bus.send(msg);
Return 0;
}
Where
But I get the follow DBUS error
QDBusConnection: error: could not send invalid message to service “â€
Re: howto send a reply using QDBusMessage
it seems that I have to implement the follow slot
Code:
int getValue
(QString key,
const QDBusMessage
&);
and the slot implemantation is
Code:
int getValue
(QString key,
const QDBusMessage
& msg
) {
Return 0;
}
However I recevied 2 replys in that case .
According to the QT document no reply should be send on return.
Re: howto send a reply using QDBusMessage
I have to set
Code:
msg.setDelayedReply(true);