I was working with Phonon multimedia framework in Qt, and it popups a message (like the volume notification message that popups when one changes the volume), because my audio device is not fully configurated, is it possible to launch my own notification from Qt?
Please see the image above.
Thank you very much.
AFAIK using libnotify is the way to go, if you dont want to use this method I found after some digging around on the net:
system("notify-send 'The Message Title' 'Your Message Text' '-t' 5000");
the -t parameter is for the notification timeout.
you can read up on notify-send here:
ubuntu forums how-to: using notify-send
a good example how how to do it in Qt in both KDE and GNOME
Thanks to the kind persons who posted the tutorials :) especially the second one; very smart.
来源:https://stackoverflow.com/questions/9818014/show-ubuntu-linux-notifications-with-qt