c++ - Qt : how to set text to QSystemTrayIcon? -


I want to dynamically set text instead of icon in QSystemTrayIcon . How is this possible?

The tray icon is not designed to show text, only small image Additionally, you can send tooltip messages You can set as @ Marilyn 069, show a balloon message or create a context menu.

Of cours, you can create an image in your program and create some text on it:

  QPixmap pixmap (24, 24); Pixmap.fill (QT :: white); Couponer painter (& pixmap); Painter.drawText (pixmap.rect (), Qt :: AlignCenter, "Hi!"); Icon.setIcon (Pixmap); Icon.setToolTip ("Hi!"); Icon.setVisible (true);  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -