Hi,
I am writing some app with notification, but currently I am stuck. I wanted to add actions to notifications, but I don't know how to read the result. Here is the code:
knotify
= new QDBusInterface("org.kde.VisualNotifications",
"/VisualNotifications",
"org.kde.VisualNotifications");
//some args initialisation
QDBusReply<QString> reply = knotify->callWithArgumentList(QDBus::Block, "Notify", args);
if (reply.isValid())
qDebug() << reply.value();
else
qDebug() << "Error";
knotify = new QDBusInterface("org.kde.VisualNotifications", "/VisualNotifications", "org.kde.VisualNotifications");
//some args initialisation
QDBusReply<QString> reply = knotify->callWithArgumentList(QDBus::Block, "Notify", args);
if (reply.isValid())
qDebug() << reply.value();
else
qDebug() << "Error";
To copy to clipboard, switch view to plain text mode
Everything works nicely, popup is shown, but commandline shows "Error" that means QDBusReply is invalid.
How can I read the result of this function?
This should return ID of the notification for further usage.
Bookmarks