updates doc of systemtray icon to include context menu
This commit is contained in:
parent
d3ec9e76bd
commit
b5f21bae0b
@ -42,18 +42,30 @@ QSystemTrayIcon can access all the instance methods defined in [EventWidget](api
|
||||
|
||||
### `trayIcon.show()`
|
||||
|
||||
Shows the icon in the system tray icon. It calls the native method [QSystemTrayIcon: show](https://doc.qt.io/qt-5/QSystemTrayIcon.html#show).
|
||||
Shows the icon in the system tray icon. It calls the native method [QSystemTrayIcon: show](https://doc.qt.io/qt-5/qsystemtrayicon.html#show).
|
||||
|
||||
### `trayIcon.hide()`
|
||||
|
||||
Hides the system tray icon. It calls the native method [QSystemTrayIcon: hide](https://doc.qt.io/qt-5/QSystemTrayIcon.html#hide).
|
||||
Hides the system tray icon. It calls the native method [QSystemTrayIcon: hide](https://doc.qt.io/qt-5/qsystemtrayicon.html#hide).
|
||||
|
||||
### `trayIcon.setIcon(icon)`
|
||||
|
||||
Sets the icon of system tray. It calls the native method [QSystemTrayIcon: setIcon](https://doc.qt.io/qt-5/QSystemTrayIcon.html#icon-prop).
|
||||
Sets the icon of system tray. It calls the native method [QSystemTrayIcon: setIcon](https://doc.qt.io/qt-5/qsystemtrayicon.html#icon-prop).
|
||||
|
||||
- `icon` [QIcon](api/QIcon.md)
|
||||
|
||||
### `trayIcon.isVisible()`
|
||||
|
||||
Returns the visibility of icon. It calls the native method [QSystemTrayIcon: setIcon](https://doc.qt.io/qt-5/QSystemTrayIcon.html#visible-prop).
|
||||
Returns the visibility of icon. It calls the native method [QSystemTrayIcon: setIcon](https://doc.qt.io/qt-5/qsystemtrayicon.html#visible-prop).
|
||||
|
||||
### `trayIcon.setToolTip(toolTip)`
|
||||
|
||||
Sets the tooltip of system tray. It calls the native method [QSystemTrayIcon: setToolTip](https://doc.qt.io/qt-5/qsystemtrayicon.html#toolTip-prop).
|
||||
|
||||
- `toolTip` string.
|
||||
|
||||
### `trayIcon.setContextMenu(contextMenu)`
|
||||
|
||||
Sets the specified menu to be the context menu for the system tray icon. It calls the native method [QSystemTrayIcon: setIcon](https://doc.qt.io/qt-5/qsystemtrayicon.html#setContextMenu).
|
||||
|
||||
- `contextMenu` [QMenu](api/QMenu.md)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user