From b5f21bae0b68f9471f56e502ee79f62da45dada2 Mon Sep 17 00:00:00 2001 From: Atul R Date: Sat, 26 Oct 2019 22:30:20 +0200 Subject: [PATCH] updates doc of systemtray icon to include context menu --- website/docs/api/QSystemTrayIcon.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/website/docs/api/QSystemTrayIcon.md b/website/docs/api/QSystemTrayIcon.md index d373f8c74..e4f41f675 100644 --- a/website/docs/api/QSystemTrayIcon.md +++ b/website/docs/api/QSystemTrayIcon.md @@ -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)