Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt - notifications without tray icon, possible?

I'm writing a C++ Qt desktop appliaction.

Is it possible to show Skype=like notifcations in Qt, without creating a tray icon?

All notification reference I found require a tray icon, which I do not want to create.

The notifications should show when the application is opened and when it is minimized.

like image 283
sara Avatar asked Jul 12 '12 11:07

sara


3 Answers

UPDATE: it seems this isn't working with recent versions of Qt. A workaround I found to make this work was to, after creating the QSystemTrayIcon:

  • Call show()
  • Display the desired message with showMessage
  • Call hide()

This works OK for me.


Create a QSystemTrayIcon but never call show() on it. Then you can use QSystemTrayIcon::showMessage to display your popup.

like image 101
Ken Bloom Avatar answered Nov 14 '22 21:11

Ken Bloom


Just create popup class and show it somwhere on the desktop with always on top flag. Notification may also be a widget

like image 32
Kamil Klimek Avatar answered Nov 14 '22 22:11

Kamil Klimek


a little late but you might be interested in this library https://github.com/Snorenotify/Snorenotify/

Snorenotify is a multi platform Qt notification framework. Using a plugin system it is possible to create notifications with many different notification systems on Windows, Unix and Mac.

like image 2
Doua Beri Avatar answered Nov 14 '22 21:11

Doua Beri