maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Qt Yellow alert message (https://talk.maemo.org/showthread.php?t=39547)

VDVsx 2010-01-07 17:09

Re: Qt Yellow alert message
 
For Qt4.5 and Qt4.6 (has it by default) without any extra lib:

Code:


QDBusMessage msg = QDBusMessage::createMethodCall("org.freedesktop.Notifications",
                                          "/org/freedesktop/Notifications",
                                          "org.freedesktop.Notifications",
                                          "SystemNoteDialog");

QString text = "Yellow alert message";

QList<QVariant> args;
args.append(text);
args.append(static_cast<quint32>(0));
args.append("ok");

msg.setArguments(args);

QDBusConnection::systemBus().call(msg);

Code from Qt-extra-libs.
EDIT: This is Maemo specific code, doesn't work in other platforms.


All times are GMT. The time now is 17:02.

vBulletin® Version 3.8.8