PythonQt.QtGui.QMenu · declarations 002
separatorsCollapsible
instance-attribute
separatorsCollapsible: bool
Qt 5 reference:
separatorsCollapsible : bool
This property holds whether consecutive separators should be collapsed
This property specifies whether consecutive separators in the menu should be visually collapsed to a single one. Separators at the beginning or the end of the menu are also hidden.
By default, this property is true.
This property was introduced in Qt 4.2.
Access functions:
| bool | separatorsCollapsible() const |
|---|---|
| void | setSeparatorsCollapsible(bool collapse) |
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#separatorsCollapsible
setActiveAction
setActiveAction(act: Any) -> None
X.setActiveAction(act)
Supplemental documentation: Qt 5 reference:
void QMenu::setActiveAction(QAction *act)
Sets the currently highlighted action to act.
See also activeAction().
Upstream PySide2 reference signatures (binding differences may apply):
setActiveAction(self, act: PySide2.QtWidgets.QAction) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setActiveAction
setDefaultAction
setDefaultAction(arg__1: Any) -> None
X.setDefaultAction(arg__1)
Supplemental documentation: Qt 5 reference:
void QMenu::setDefaultAction(QAction *act)
This sets the default action to act. The default action may have a visual cue, depending on the current QStyle. A default action usually indicates what will happen by default when a drop occurs.
See also defaultAction().
Upstream PySide2 reference signatures (binding differences may apply):
setDefaultAction(self, arg__1: PySide2.QtWidgets.QAction) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setDefaultAction
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/qmenu.html#setIcon
setSeparatorsCollapsible
setSeparatorsCollapsible(collapse: bool) -> None
X.setSeparatorsCollapsible(collapse)
Upstream PySide2 reference signatures (binding differences may apply):
setSeparatorsCollapsible(self, collapse: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setSeparatorsCollapsible
setTearOffEnabled
setTearOffEnabled(arg__1: bool) -> None
X.setTearOffEnabled(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setTearOffEnabled(self, arg__1: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setTearOffEnabled
setTitle
setTitle(title: str) -> None
X.setTitle(title)
Upstream PySide2 reference signatures (binding differences may apply):
setTitle(self, title: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setTitle
setToolTipsVisible
setToolTipsVisible(visible: bool) -> None
X.setToolTipsVisible(visible)
Upstream PySide2 reference signatures (binding differences may apply):
setToolTipsVisible(self, visible: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#setToolTipsVisible
sizeHint
instance-attribute
sizeHint: QSize
Qt 5 reference:
[override virtual] QSize QMenu::sizeHint() const
Reimplements an access function for property: QWidget::sizeHint.
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#sizeHint
tearOffEnabled
instance-attribute
tearOffEnabled: Any
Qt 5 reference:
tearOffEnabled : bool
This property holds whether the menu supports being torn off
When true, the menu contains a special tear-off item (often shown as a dashed line at the top of the menu) that creates a copy of the menu when it is triggered.
This "torn-off" copy lives in a separate window. It contains the same menu items as the original menu, with the exception of the tear-off handle.
By default, this property is false.
Access functions:
| bool | isTearOffEnabled() const |
|---|---|
| void | setTearOffEnabled(bool) |
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#tearOffEnabled
timerEvent
timerEvent(arg__1: Any) -> None
X.timerEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QMenu::timerEvent(QTimerEvent *e)
Reimplements: QObject::timerEvent(QTimerEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
timerEvent(self, arg__1: PySide2.QtCore.QTimerEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#timerEvent
title
instance-attribute
title: str
Qt 5 reference:
title : QString
This property holds the title of the menu
This is equivalent to the QAction::text property of the menuAction().
By default, this property contains an empty string.
Access functions:
| QString | title() const |
|---|---|
| void | setTitle(const QString \&title) |
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#title
toolTipsVisible
instance-attribute
toolTipsVisible: bool
Qt 5 reference:
toolTipsVisible : bool
This property holds whether tooltips of menu actions should be visible
This property specifies whether action menu entries show their tooltip.
By default, this property is false.
This property was introduced in Qt 5.1.
Access functions:
| bool | toolTipsVisible() const |
|---|---|
| void | setToolTipsVisible(bool visible) |
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#toolTipsVisible
triggered
triggered(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QMenu.triggered; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QMenu::triggered(QAction *action)
This signal is emitted when an action in this menu is triggered.
action is the action that caused the signal to be emitted.
Normally, you connect each menu action's triggered() signal to its own custom slot, but sometimes you will want to connect several actions to a single slot, for example, when you have a group of closely related actions, such as "left justify", "center", "right justify".
Note: This signal is emitted for the main parent menu in a hierarchy. Hence, only the parent menu needs to be connected to a slot; sub-menus need not be connected.
See also hovered() and QAction::triggered().
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#triggered
wheelEvent
wheelEvent(arg__1: Any) -> None
X.wheelEvent(arg__1)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QMenu::wheelEvent(QWheelEvent *e)
Reimplements: QWidget::wheelEvent(QWheelEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
wheelEvent(self, arg__1: PySide2.QtGui.QWheelEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qmenu.html#wheelEvent
windowIconChanged
windowIconChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QMenu.windowIconChanged; argument details are not documented.
windowIconTextChanged
windowIconTextChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QMenu.windowIconTextChanged; argument details are not documented.
windowTitleChanged
windowTitleChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QMenu.windowTitleChanged; argument details are not documented.