![]() |
Home · Overviews · Examples | ![]() |
The QSystemTrayIcon class provides an icon for an application in the system tray. More...
Inherits QObject.
The QSystemTrayIcon class provides an icon for an application in the system tray.
Modern operating systems usually provide a special area on the desktop, called the system tray or notification area, where long-running applications can display icons and short messages.
The QSystemTrayIcon class can be used on the following platforms:
To check whether a system tray is present on the user's desktop, call the QSystemTrayIcon::isSystemTrayAvailable() static function.
To add a system tray entry, create a QSystemTrayIcon object, call setContextMenu to provide a context menu for the icon, and call show to make it visible in the system tray. Status notification messages ("balloon messages") can be displayed at any time using showMessage.
If the system tray is unavailable when a system tray icon is constructed, but becomes available later, QSystemTrayIcon will automatically add an entry for the application in the system tray if the icon is visible.
The activated signal is emitted when the user activates the icon.
Only on X11, when a tooltip is requested, the QSystemTrayIcon receives a QHelpEvent of type QEvent::ToolTip. Additionally, the QSystemTrayIcon receives wheel events of type QEvent::Wheel. These are not supported on any other platform.
See also QDesktopServices, QDesktopWidget, Desktop Integration, and System Tray Icon Example.
Copyright © 2008 Trolltech | Trademarks | Qt Jambi 4.3.4_01 |