Skip to content

PythonQt.QtGui.QAction · declarations 002

Back to PythonQt.QtGui.QAction

parentWidget

parentWidget() -> Any

X.parentWidget() -> PythonQt.QtGui.QWidget

Supplemental documentation: Qt 5 reference:

QWidget *QAction::parentWidget() const

Returns the parent widget.

Upstream PySide2 reference signatures (binding differences may apply):

parentWidget(self) -> PySide2.QtWidgets.QWidget

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#parentWidget

priority instance-attribute

priority: Any

Qt 5 reference:

priority : Priority

This property holds the actions's priority in the user interface.

This property can be set to indicate how the action should be prioritized in the user interface.

For instance, when toolbars have the Qt::ToolButtonTextBesideIcon mode set, then actions with LowPriority will not show the text labels.

This property was introduced in Qt 4.6.

Access functions:

QAction::Priority priority() const
void setPriority(QAction::Priority priority)

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#priority

setActionGroup

setActionGroup(group: Any) -> None

X.setActionGroup(group)

Supplemental documentation: Qt 5 reference:

void QAction::setActionGroup(QActionGroup *group)

Sets this action group to group. The action will be automatically added to the group's list of actions.

Actions within the group will be mutually exclusive.

See also QActionGroup and QAction::actionGroup().

Upstream PySide2 reference signatures (binding differences may apply):

setActionGroup(self, group: PySide2.QtWidgets.QActionGroup) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setActionGroup

setAutoRepeat

setAutoRepeat(arg__1: bool) -> None

X.setAutoRepeat(arg__1)

Upstream PySide2 reference signatures (binding differences may apply):

setAutoRepeat(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setAutoRepeat

setCheckable

setCheckable(arg__1: bool) -> None

X.setCheckable(arg__1)

Upstream PySide2 reference signatures (binding differences may apply):

setCheckable(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setCheckable

setChecked

setChecked(a: Any) -> None

X.setChecked(a)

Upstream PySide2 reference signatures (binding differences may apply):

setChecked(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setChecked

setData

setData(var: Any) -> None

X.setData(var)

Supplemental documentation: Qt 5 reference:

void QAction::setData(const QVariant \&userData)

Sets the action's internal data to the given userData.

See also data().

Upstream PySide2 reference signatures (binding differences may apply):

setData(self, var: typing.Any) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setData

setDisabled

setDisabled(b: bool) -> None

X.setDisabled(b)

Supplemental documentation: Qt 5 reference:

[slot] void QAction::setDisabled(bool b)

This is a convenience function for the enabled property, that is useful for signals--slots connections. If b is true the action is disabled; otherwise it is enabled.

Upstream PySide2 reference signatures (binding differences may apply):

setDisabled(self, b: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setDisabled

setEnabled

setEnabled(a: Any) -> None

X.setEnabled(a)

Upstream PySide2 reference signatures (binding differences may apply):

setEnabled(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setEnabled

setFont

setFont(font: Any) -> None

X.setFont(font)

Upstream PySide2 reference signatures (binding differences may apply):

setFont(self, font: PySide2.QtGui.QFont) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setFont

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/qaction.html#setIcon

setIconText

setIconText(text: str) -> None

X.setIconText(text)

Upstream PySide2 reference signatures (binding differences may apply):

setIconText(self, text: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setIconText

setIconVisibleInMenu

setIconVisibleInMenu(visible: bool) -> None

X.setIconVisibleInMenu(visible)

Upstream PySide2 reference signatures (binding differences may apply):

setIconVisibleInMenu(self, visible: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setIconVisibleInMenu

setMenu

setMenu(menu: Any) -> None

X.setMenu(menu)

Supplemental documentation: Qt 5 reference:

void QAction::setMenu(QMenu *menu)

Sets the menu contained by this action to the specified menu.

See also menu().

Upstream PySide2 reference signatures (binding differences may apply):

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

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setMenu

setMenuRole

setMenuRole(menuRole: Any) -> None

X.setMenuRole(menuRole)

Upstream PySide2 reference signatures (binding differences may apply):

setMenuRole(self, menuRole: PySide2.QtWidgets.QAction.MenuRole) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setMenuRole

setPriority

setPriority(priority: Any) -> None

X.setPriority(priority)

Upstream PySide2 reference signatures (binding differences may apply):

setPriority(self, priority: PySide2.QtWidgets.QAction.Priority) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setPriority

setSeparator

setSeparator(b: bool) -> None

X.setSeparator(b)

Supplemental documentation: Qt 5 reference:

void QAction::setSeparator(bool b)

If b is true then this action will be considered a separator.

How a separator is represented depends on the widget it is inserted into. Under most circumstances the text, submenu, and icon will be ignored for separator actions.

See also QAction::isSeparator().

Upstream PySide2 reference signatures (binding differences may apply):

setSeparator(self, b: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setSeparator

setShortcut

setShortcut(shortcut: Any) -> None

X.setShortcut(shortcut)

Upstream PySide2 reference signatures (binding differences may apply):

setShortcut(self, shortcut: PySide2.QtGui.QKeySequence) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setShortcut

setShortcutContext

setShortcutContext(context: Any) -> None

X.setShortcutContext(context)

Upstream PySide2 reference signatures (binding differences may apply):

setShortcutContext(self, context: PySide2.QtCore.Qt.ShortcutContext) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setShortcutContext

setShortcuts

setShortcuts(arg__1: Any) -> None

X.setShortcuts(arg__1)

Supplemental documentation: Qt 5 reference:

void QAction::setShortcuts(const QList\<QKeySequence> \&shortcuts)

Sets shortcuts as the list of shortcuts that trigger the action. The first element of the list is the primary shortcut.

This function was introduced in Qt 4.2.

See also shortcuts() and shortcut.

void QAction::setShortcuts(QKeySequence::StandardKey key)

Sets a platform dependent list of shortcuts based on the key. The result of calling this function will depend on the currently running platform. Note that more than one shortcut can assigned by this action. If only the primary shortcut is required, use setShortcut instead.

This function was introduced in Qt 4.2.

See also QKeySequence::keyBindings().

Upstream PySide2 reference signatures (binding differences may apply):

setShortcuts(self, arg__1: PySide2.QtGui.QKeySequence.StandardKey) -> None
setShortcuts(self, shortcuts: typing.Sequence[PySide2.QtGui.QKeySequence]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setShortcuts

setStatusTip

setStatusTip(statusTip: str) -> None

X.setStatusTip(statusTip)

Upstream PySide2 reference signatures (binding differences may apply):

setStatusTip(self, statusTip: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setStatusTip

setText

setText(text: str) -> None

X.setText(text)

Upstream PySide2 reference signatures (binding differences may apply):

setText(self, text: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setText

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/qaction.html#setToolTip

setVisible

setVisible(a: Any) -> None

X.setVisible(a)

Upstream PySide2 reference signatures (binding differences may apply):

setVisible(self, arg__1: bool) -> None

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

setWhatsThis

setWhatsThis(what: str) -> None

X.setWhatsThis(what)

Upstream PySide2 reference signatures (binding differences may apply):

setWhatsThis(self, what: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#setWhatsThis

shortcut instance-attribute

shortcut: QKeySequence

Qt 5 reference:

shortcut : QKeySequence

This property holds the action's primary shortcut key

Valid keycodes for this property can be found in Qt::Key and Qt::Modifier. There is no default shortcut key.

Access functions:

QKeySequence shortcut() const
void setShortcut(const QKeySequence \&shortcut)

Notifier signal:

void changed()

QKeySequence QAction::shortcut() const

Returns the primary shortcut.

Note: Getter function for property shortcut.

See also setShortcuts().

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#shortcut

shortcutContext instance-attribute

shortcutContext: Any

Qt 5 reference:

shortcutContext : Qt::ShortcutContext

This property holds the context for the action's shortcut

Valid values for this property can be found in Qt::ShortcutContext. The default value is Qt::WindowShortcut.

Access functions:

Qt::ShortcutContext shortcutContext() const
void setShortcutContext(Qt::ShortcutContext context)

Notifier signal:

void changed()

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#shortcutContext

shortcutVisibleInContextMenu instance-attribute

shortcutVisibleInContextMenu: Any

Qt 5 reference:

shortcutVisibleInContextMenu : bool

This property holds whether or not an action should show a shortcut in a context menu

In some applications, it may make sense to have actions with shortcuts in context menus. If true, the shortcut (if valid) is shown when the action is shown via a context menu, when it is false, it is not shown.

The default is to follow whether the Qt::AA_DontShowShortcutsInContextMenus attribute is set for the application. Explicitly setting this property overrides the attribute.

This property was introduced in Qt 5.10.

Access functions:

bool isShortcutVisibleInContextMenu() const
void setShortcutVisibleInContextMenu(bool show)

Notifier signal:

void changed()

See also QAction::shortcut and QCoreApplication::setAttribute().

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#shortcutVisibleInContextMenu

shortcuts

shortcuts() -> tuple

X.shortcuts() -> tuple

Supplemental documentation: Qt 5 reference:

QList\<QKeySequence> QAction::shortcuts() const

Returns the list of shortcuts, with the primary shortcut as the first element of the list.

This function was introduced in Qt 4.2.

See also setShortcuts().

Upstream PySide2 reference signatures (binding differences may apply):

shortcuts(self) -> typing.List[PySide2.QtGui.QKeySequence]

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#shortcuts

showStatusText

showStatusText(widget: Any) -> bool

X.showStatusText(widget) -> bool

Supplemental documentation: Qt 5 reference:

bool QAction::showStatusText(QWidget *widget \= nullptr)

Updates the relevant status bar for the widget specified by sending a QStatusTipEvent to its parent widget. Returns true if an event was sent; otherwise returns false.

If a null widget is specified, the event is sent to the action's parent.

See also statusTip.

Upstream PySide2 reference signatures (binding differences may apply):

showStatusText(self, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#showStatusText

statusTip instance-attribute

statusTip: str

Qt 5 reference:

statusTip : QString

This property holds the action's status tip

The status tip is displayed on all status bars provided by the action's top-level parent widget.

By default, this property contains an empty string.

Access functions:

QString statusTip() const
void setStatusTip(const QString \&statusTip)

Notifier signal:

void changed()

See also setToolTip() and showStatusText().

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#statusTip

text instance-attribute

text: str

Qt 5 reference:

text : QString

This property holds the action's descriptive text

If the action is added to a menu, the menu option will consist of the icon (if there is one), the text, and the shortcut (if there is one). If the text is not explicitly set in the constructor, or by using setText(), the action's description icon text will be used as text. There is no default text.

Access functions:

QString text() const
void setText(const QString \&text)

Notifier signal:

void changed()

See also iconText.

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#text

toggle

toggle() -> None

X.toggle()

Supplemental documentation: Qt 5 reference:

[slot] void QAction::toggle()

This is a convenience function for the checked property. Connect to it to change the checked state to its opposite state.

Upstream PySide2 reference signatures (binding differences may apply):

toggle(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#toggle

toggled

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

Native PythonQt.QtGui.QAction.toggled; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QAction::toggled(bool checked)

This signal is emitted whenever a checkable action changes its isChecked() status. This can be the result of a user interaction, or because setChecked() was called. As setChecked() changes the QAction, it emits changed() in addition to toggled().

checked is true if the action is checked, or false if the action is unchecked.

Note: Notifier signal for property checked.

See also QAction::activate(), QAction::triggered(), and checked.

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#toggled

toolTip instance-attribute

toolTip: str

Qt 5 reference:

toolTip : QString

This property holds the action's tooltip

This text is used for the tooltip. If no tooltip is specified, the action's text is used.

By default, this property contains the action's text.

Access functions:

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

Notifier signal:

void changed()

See also setStatusTip() and setShortcut().

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

trigger

trigger() -> None

X.trigger()

Supplemental documentation: Qt 5 reference:

[slot] void QAction::trigger()

This is a convenience slot that calls activate(Trigger).

Upstream PySide2 reference signatures (binding differences may apply):

trigger(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#trigger

triggered

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

Native PythonQt.QtGui.QAction.triggered; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QAction::triggered(bool checked \= false)

This signal is emitted when an action is activated by the user; for example, when the user clicks a menu option, toolbar button, or presses an action's shortcut key combination, or when trigger() was called. Notably, it is not emitted when setChecked() or toggle() is called.

If the action is checkable, checked is true if the action is checked, or false if the action is unchecked.

See also QAction::activate(), QAction::toggled(), and checked.

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#triggered

visible instance-attribute

visible: Any

Qt 5 reference:

visible : bool

This property holds whether the action can be seen (e.g. in menus and toolbars)

If visible is true the action can be seen (e.g. in menus and toolbars) and chosen by the user; if visible is false the action cannot be seen or chosen by the user.

Actions which are not visible are not grayed out; they do not appear at all.

By default, this property is true (actions are visible).

Access functions:

bool isVisible() const
void setVisible(bool)

Notifier signal:

void changed()

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

whatsThis instance-attribute

whatsThis: str

Qt 5 reference:

whatsThis : QString

This property holds the action's "What's This?" help text

The "What's This?" text is used to provide a brief description of the action. The text may contain rich text. There is no default "What's This?" text.

Access functions:

QString whatsThis() const
void setWhatsThis(const QString \&what)

Notifier signal:

void changed()

See also QWhatsThis.

Source: https://doc.qt.io/archives/qt-5.15/qaction.html#whatsThis