Skip to content

PythonQt.QtGui.QSystemTrayIcon · declarations 001

Back to PythonQt.QtGui.QSystemTrayIcon

ActivationReason instance-attribute

ActivationReason: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

Context instance-attribute

Context: Any

DoubleClick instance-attribute

DoubleClick: Any

MessageIcon instance-attribute

MessageIcon: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

MiddleClick instance-attribute

MiddleClick: Any

Unknown instance-attribute

Unknown: Any

activated

activated(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSystemTrayIcon.activated; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QSystemTrayIcon::activated(QSystemTrayIcon::ActivationReason reason)

This signal is emitted when the user activates the system tray icon. reason specifies the reason for activation. QSystemTrayIcon::ActivationReason enumerates the various reasons.

See also QSystemTrayIcon::ActivationReason.

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#activated

contextMenu

contextMenu() -> Any

X.contextMenu() -> PythonQt.QtGui.QMenu

Supplemental documentation: Qt 5 reference:

QMenu *QSystemTrayIcon::contextMenu() const

Returns the current context menu for the system tray entry.

See also setContextMenu().

Upstream PySide2 reference signatures (binding differences may apply):

contextMenu(self) -> PySide2.QtWidgets.QMenu

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#contextMenu

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSystemTrayIcon.destroyed; argument details are not documented.

event

event(event: Any) -> bool

X.event(event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QSystemTrayIcon::event(QEvent *e)

Reimplements: QObject::event(QEvent *e).

Upstream PySide2 reference signatures (binding differences may apply):

event(self, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#event

geometry

geometry() -> Any

X.geometry() -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QSystemTrayIcon::geometry() const

Returns the geometry of the system tray icon in screen coordinates.

This function was introduced in Qt 4.3.

See also visible.

Upstream PySide2 reference signatures (binding differences may apply):

geometry(self) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#geometry

hide

hide() -> None

X.hide()

Supplemental documentation: Qt 5 reference:

[slot] void QSystemTrayIcon::hide()

Hides the system tray entry.

See also show() and visible.

Upstream PySide2 reference signatures (binding differences may apply):

hide(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#hide

icon instance-attribute

icon: QIcon

Qt 5 reference:

icon : QIcon

This property holds the system tray icon

On Windows, the system tray icon size is 16x16; on X11, the preferred size is 22x22. The icon will be scaled to the appropriate size as necessary.

Access functions:

QIcon icon() const
void setIcon(const QIcon \&icon)

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#icon

isSystemTrayAvailable

isSystemTrayAvailable() -> bool

X.isSystemTrayAvailable() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QSystemTrayIcon::isSystemTrayAvailable()

Returns true if the system tray is available; otherwise returns false.

If the system tray is currently unavailable but becomes available later, QSystemTrayIcon will automatically add an entry in the system tray if it is visible.

Upstream PySide2 reference signatures (binding differences may apply):

isSystemTrayAvailable() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#isSystemTrayAvailable

isVisible

isVisible() -> bool

X.isVisible() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isVisible(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#isVisible

messageClicked

messageClicked(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSystemTrayIcon.messageClicked; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QSystemTrayIcon::messageClicked()

This signal is emitted when the message displayed using showMessage() was clicked by the user.

Note: We follow Microsoft Windows behavior, so the signal is also emitted when the user clicks on a tray icon with a balloon message displayed.

See also activated().

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#messageClicked

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSystemTrayIcon.objectNameChanged; argument details are not documented.

setContextMenu

setContextMenu(menu: Any) -> None

X.setContextMenu(menu)

Supplemental documentation: Qt 5 reference:

void QSystemTrayIcon::setContextMenu(QMenu *menu)

Sets the specified menu to be the context menu for the system tray icon.

The menu will pop up when the user requests the context menu for the system tray icon by clicking the mouse button.

On macOS, this is currently converted to a NSMenu, so the aboutToHide() signal is not emitted.

Note: The system tray icon does not take ownership of the menu. You must ensure that it is deleted at the appropriate time by, for example, creating the menu with a suitable parent object.

See also contextMenu().

Upstream PySide2 reference signatures (binding differences may apply):

setContextMenu(self, menu: PySide2.QtWidgets.QMenu) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#setContextMenu

setIcon

setIcon(icon: Any) -> None

X.setIcon(icon)

Upstream PySide2 reference signatures (binding differences may apply):

setIcon(self, icon: PySide2.QtGui.QIcon) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#setIcon

setToolTip

setToolTip(tip: str) -> None

X.setToolTip(tip)

Upstream PySide2 reference signatures (binding differences may apply):

setToolTip(self, tip: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#setToolTip

setVisible

setVisible(visible: bool) -> None

X.setVisible(visible)

Upstream PySide2 reference signatures (binding differences may apply):

setVisible(self, visible: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#setVisible

show

show() -> None

X.show()

Supplemental documentation: Qt 5 reference:

[slot] void QSystemTrayIcon::show()

Shows the icon in the system tray.

See also hide() and visible.

Upstream PySide2 reference signatures (binding differences may apply):

show(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#show

showMessage

showMessage(title: str, msg: str, icon: Any, msecs: int) -> None

X.showMessage(title, msg, icon, msecs)

Supplemental documentation: Qt 5 reference:

[slot] void QSystemTrayIcon::showMessage(const QString \&title, const QString \&message, QSystemTrayIcon::MessageIcon icon \= QSystemTrayIcon::Information, int millisecondsTimeoutHint \= 10000)

Shows a balloon message for the entry with the given title, message and icon for the time specified in millisecondsTimeoutHint. title and message must be plain text strings.

Message can be clicked by the user; the messageClicked() signal will emitted when this occurs.

Note that display of messages are dependent on the system configuration and user preferences, and that messages may not appear at all. Hence, it should not be relied upon as the sole means for providing critical information.

On Windows, the millisecondsTimeoutHint is usually ignored by the system when the application has focus.

Has been turned into a slot in Qt 5.2.

This function was introduced in Qt 4.3.

See also show() and supportsMessages().

[slot] void QSystemTrayIcon::showMessage(const QString \&title, const QString \&message, const QIcon \&icon, int millisecondsTimeoutHint \= 10000)

This function overloads showMessage().

Shows a balloon message for the entry with the given title, message, and custom icon icon for the time specified in millisecondsTimeoutHint.

This function was introduced in Qt 5.9.

Upstream PySide2 reference signatures (binding differences may apply):

showMessage(self, title: str, msg: str, icon: PySide2.QtGui.QIcon, msecs: int=...) -> None
showMessage(self, title: str, msg: str, icon: PySide2.QtWidgets.QSystemTrayIcon.MessageIcon=..., msecs: int=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#showMessage

supportsMessages

supportsMessages() -> bool

X.supportsMessages() -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QSystemTrayIcon::supportsMessages()

Returns true if the system tray supports balloon messages; otherwise returns false.

See also showMessage().

Upstream PySide2 reference signatures (binding differences may apply):

supportsMessages() -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#supportsMessages

toolTip instance-attribute

toolTip: str

Qt 5 reference:

toolTip : QString

This property holds the tooltip for the system tray entry

On some systems, the tooltip's length is limited. The tooltip will be truncated if necessary.

Access functions:

QString toolTip() const
void setToolTip(const QString \&tip)

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#toolTip

visible instance-attribute

visible: Any

Qt 5 reference:

visible : bool

This property holds whether the system tray entry is visible

Setting this property to true or calling show() makes the system tray icon visible; setting this property to false or calling hide() hides it.

Access functions:

bool isVisible() const
void setVisible(bool visible)

Source: https://doc.qt.io/archives/qt-5.15/qsystemtrayicon.html#visible