QPlatformSystemTrayIcon Class

The QPlatformSystemTrayIcon class abstracts the system tray icon and interaction. More...

Header: #include <QPlatformSystemTrayIcon>
Inherits: QObject
Inherited By:

QDBusTrayIcon

Public Types

enum ActivationReason { Unknown, Context, DoubleClick, Trigger, MiddleClick }
enum MessageIcon { NoIcon, Information, Warning, Critical }

Public Functions

virtual QPlatformMenu *createMenu() const

Detailed Description

\inmoduleQtGui

\internal

See also QSystemTrayIcon.

Member Type Documentation

enum QPlatformSystemTrayIcon::ActivationReason

This enum describes the reason the system tray was activated.

ConstantValueDescription
QPlatformSystemTrayIcon::Unknown0Unknown reason
QPlatformSystemTrayIcon::Context1The context menu for the system tray entry was requested
QPlatformSystemTrayIcon::DoubleClick2The system tray entry was double clicked
QPlatformSystemTrayIcon::Trigger3The system tray entry was clicked
QPlatformSystemTrayIcon::MiddleClick4The system tray entry was clicked with the middle mouse button

See also activated().

enum QPlatformSystemTrayIcon::MessageIcon

This enum describes the icon that is shown when a balloon message is displayed.

ConstantValueDescription
QPlatformSystemTrayIcon::NoIcon0No icon is shown.
QPlatformSystemTrayIcon::Information1An information icon is shown.
QPlatformSystemTrayIcon::Warning2A standard warning icon is shown.
QPlatformSystemTrayIcon::Critical3A critical warning icon is shown.

See also updateIcon(), showMessage(), and QMessageBox.

Member Function Documentation

[virtual] QPlatformMenu *QPlatformSystemTrayIcon::createMenu() const

This method allows platforms to use a different QPlatformMenu for system tray menus than what would normally be used for e.g. menu bars. The default implementation falls back to a platform menu created by the platform theme, which may be null on platforms without native menus.

\since5.3

See also updateMenu().