PythonQt.QtGui.QAction · declarations 001
Back to PythonQt.QtGui.QAction
AboutQtRole
instance-attribute
AboutQtRole: Any
AboutRole
instance-attribute
AboutRole: Any
ActionEvent
instance-attribute
ActionEvent: 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
ApplicationSpecificRole
instance-attribute
ApplicationSpecificRole: Any
Hover
instance-attribute
Hover: Any
LowPriority
instance-attribute
LowPriority: Any
MenuRole
instance-attribute
MenuRole: 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
NoRole
instance-attribute
NoRole: Any
PreferencesRole
instance-attribute
PreferencesRole: Any
Priority
instance-attribute
Priority: 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
QuitRole
instance-attribute
QuitRole: Any
TextHeuristicRole
instance-attribute
TextHeuristicRole: Any
Trigger
instance-attribute
Trigger: Any
actionGroup
actionGroup() -> Any
X.actionGroup() -> PythonQt.QtGui.QActionGroup
Supplemental documentation: Qt 5 reference:
QActionGroup *QAction::actionGroup() const
Returns the action group for this action. If no action group manages this action then 0 will be returned.
See also QActionGroup and QAction::setActionGroup().
Upstream PySide2 reference signatures (binding differences may apply):
actionGroup(self) -> PySide2.QtWidgets.QActionGroup
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#actionGroup
activate
activate(event: Any) -> None
X.activate(event)
Supplemental documentation: Qt 5 reference:
void QAction::activate(QAction::ActionEvent event)
Sends the relevant signals for ActionEvent event.
Action based widgets use this API to cause the QAction to emit signals as well as emitting their own.
Upstream PySide2 reference signatures (binding differences may apply):
activate(self, event: PySide2.QtWidgets.QAction.ActionEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#activate
associatedGraphicsWidgets
associatedGraphicsWidgets() -> tuple
X.associatedGraphicsWidgets() -> tuple
Supplemental documentation: Qt 5 reference:
QList\<QGraphicsWidget *> QAction::associatedGraphicsWidgets() const
Returns a list of widgets this action has been added to.
This function was introduced in Qt 4.5.
See also QWidget::addAction() and associatedWidgets().
Upstream PySide2 reference signatures (binding differences may apply):
associatedGraphicsWidgets(self) -> typing.List[PySide2.QtWidgets.QGraphicsWidget]
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#associatedGraphicsWidgets
associatedWidgets
associatedWidgets() -> tuple
X.associatedWidgets() -> tuple
Supplemental documentation: Qt 5 reference:
QList\<QWidget *> QAction::associatedWidgets() const
Returns a list of widgets this action has been added to.
This function was introduced in Qt 4.2.
See also QWidget::addAction() and associatedGraphicsWidgets().
Upstream PySide2 reference signatures (binding differences may apply):
associatedWidgets(self) -> typing.List[PySide2.QtWidgets.QWidget]
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#associatedWidgets
autoRepeat
instance-attribute
autoRepeat: bool
Qt 5 reference:
autoRepeat : bool
This property holds whether the action can auto repeat
If true, the action will auto repeat when the keyboard shortcut combination is held down, provided that keyboard auto repeat is enabled on the system. The default value is true.
This property was introduced in Qt 4.2.
Access functions:
| bool | autoRepeat() const |
|---|---|
| void | setAutoRepeat(bool) |
Notifier signal:
| void | changed() |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#autoRepeat
changed
changed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAction.changed; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QAction::changed()
This signal is emitted when an action has changed. If you are only interested in actions in a given widget, you can watch for QWidget::actionEvent() sent with an QEvent::ActionChanged.
Note: Notifier signal for property autoRepeat. Notifier signal for property checkable. Notifier signal for property enabled. Notifier signal for property font. Notifier signal for property icon. Notifier signal for property iconText. Notifier signal for property iconVisibleInMenu. Notifier signal for property menuRole. Notifier signal for property shortcut. Notifier signal for property shortcutContext. Notifier signal for property shortcutVisibleInContextMenu. Notifier signal for property statusTip. Notifier signal for property text. Notifier signal for property toolTip. Notifier signal for property visible. Notifier signal for property whatsThis.
See also QWidget::actionEvent().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#changed
checkable
instance-attribute
checkable: Any
Qt 5 reference:
checkable : bool
This property holds whether the action is a checkable action
A checkable action is one which has an on/off state. For example, in a word processor, a
Bold toolbar button may be either on or off. An action which is not a toggle action is a
command action; a command action is simply executed, e.g. file save. By default, this
property is false.
In some situations, the state of one toggle action should depend on the state of others. For example, "Left Align", "Center" and "Right Align" toggle actions are mutually exclusive. To achieve exclusive toggling, add the relevant toggle actions to a QActionGroup with the QActionGroup::exclusive property set to true.
Access functions:
| bool | isCheckable() const |
|---|---|
| void | setCheckable(bool) |
Notifier signal:
| void | changed() |
|---|---|
See also QAction::setChecked().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#checkable
checked
instance-attribute
checked: Any
Qt 5 reference:
checked : bool
This property holds whether the action is checked.
Only checkable actions can be checked. By default, this is false (the action is unchecked).
Note: The notifier signal for this property is toggled(). As toggling a QAction changes its state, it will also emit a changed() signal.
Access functions:
| bool | isChecked() const |
|---|---|
| void | setChecked(bool) |
Notifier signal:
| void | toggled(bool checked) |
|---|---|
See also checkable and toggled().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#checked
data
data() -> Any
X.data() -> object
Supplemental documentation: Qt 5 reference:
QVariant QAction::data() const
Returns the user data as set in QAction::setData.
See also setData().
Upstream PySide2 reference signatures (binding differences may apply):
data(self) -> typing.Any
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#data
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAction.destroyed; argument details are not documented.
enabled
instance-attribute
enabled: Any
Qt 5 reference:
enabled : bool
This property holds whether the action is enabled
Disabled actions cannot be chosen by the user. They do not disappear from menus or toolbars, but they are displayed in a way which indicates that they are unavailable. For example, they might be displayed using only shades of gray.
What's This? help on disabled actions is still available, provided that the QAction::whatsThis property is set.
An action will be disabled when all widgets to which it is added (with QWidget::addAction()) are disabled or not visible. When an action is disabled, it is not possible to trigger it through its shortcut.
By default, this property is true (actions are enabled).
Access functions:
| bool | isEnabled() const |
|---|---|
| void | setEnabled(bool) |
Notifier signal:
| void | changed() |
|---|---|
See also text.
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#enabled
event
event(arg__1: Any) -> bool
X.event(arg__1) -> bool
Supplemental documentation: Qt 5 reference:
[override virtual protected] bool QAction::event(QEvent *e)
Reimplements: QObject::event(QEvent *e).
Upstream PySide2 reference signatures (binding differences may apply):
event(self, arg__1: PySide2.QtCore.QEvent) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#event
font
instance-attribute
font: QFont
Qt 5 reference:
font : QFont
This property holds the action's font
The font property is used to render the text set on the QAction. The font will can be considered a hint as it will not be consulted in all cases based upon application and style.
By default, this property contains the application's default font.
Access functions:
| QFont | font() const |
|---|---|
| void | setFont(const QFont \&font) |
Notifier signal:
| void | changed() |
|---|---|
See also QAction::setText() and QStyle.
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#font
hover
hover() -> None
X.hover()
Supplemental documentation: Qt 5 reference:
[slot] void QAction::hover()
This is a convenience slot that calls activate(Hover).
Upstream PySide2 reference signatures (binding differences may apply):
hover(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#hover
hovered
hovered(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAction.hovered; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QAction::hovered()
This signal is emitted when an action is highlighted by the user; for example, when the user pauses with the cursor over a menu option, toolbar button, or presses an action's shortcut key combination.
See also QAction::activate().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#hovered
icon
instance-attribute
icon: QIcon
Qt 5 reference:
icon : QIcon
This property holds the action's icon
In toolbars, the icon is used as the tool button icon; in menus, it is displayed to the left of the menu text. There is no default icon.
If a null icon (QIcon::isNull()) is passed into this function, the icon of the action is cleared.
Access functions:
| QIcon | icon() const |
|---|---|
| void | setIcon(const QIcon \&icon) |
Notifier signal:
| void | changed() |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#icon
iconText
instance-attribute
iconText: str
Qt 5 reference:
iconText : QString
This property holds the action's descriptive icon text
If QToolBar::toolButtonStyle is set to a value that permits text to be displayed, the text defined held in this property appears as a label in the relevant tool button.
It also serves as the default text in menus and tooltips if the action has not been defined with setText() or setToolTip(), and will also be used in toolbar buttons if no icon has been defined using setIcon().
If the icon text is not explicitly set, the action's normal text will be used for the icon text.
By default, this property contains an empty string.
Access functions:
| QString | iconText() const |
|---|---|
| void | setIconText(const QString \&text) |
Notifier signal:
| void | changed() |
|---|---|
See also setToolTip() and setStatusTip().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#iconText
iconVisibleInMenu
instance-attribute
iconVisibleInMenu: Any
Qt 5 reference:
iconVisibleInMenu : bool
This property holds whether or not an action should show an icon in a menu
In some applications, it may make sense to have actions with icons in the toolbar, but not in menus. If true, the icon (if valid) is shown in the menu, when it is false, it is not shown.
The default is to follow whether the Qt::AA_DontShowIconsInMenus attribute is set for the application. Explicitly settings this property overrides the presence (or abscence) of the attribute.
For example:
QApplication app(argc, argv);
app.setAttribute(Qt::AA_DontShowIconsInMenus); // Icons are *no longer shown* in menus
// ...
QAction *myAction = new QAction();
// ...
myAction->setIcon(SomeIcon);
myAction->setIconVisibleInMenu(true); // Icon *will* be shown in menus for *this* action.
This property was introduced in Qt 4.4.
Access functions:
| bool | isIconVisibleInMenu() const |
|---|---|
| void | setIconVisibleInMenu(bool visible) |
Notifier signal:
| void | changed() |
|---|---|
See also QAction::icon and QCoreApplication::setAttribute().
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#iconVisibleInMenu
isCheckable
isCheckable() -> bool
X.isCheckable() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isCheckable(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#isCheckable
isChecked
isChecked() -> bool
X.isChecked() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isChecked(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#isChecked
isEnabled
isEnabled() -> bool
X.isEnabled() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isEnabled(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#isEnabled
isIconVisibleInMenu
isIconVisibleInMenu() -> bool
X.isIconVisibleInMenu() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isIconVisibleInMenu(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#isIconVisibleInMenu
isSeparator
isSeparator() -> bool
X.isSeparator() -> bool
Supplemental documentation: Qt 5 reference:
bool QAction::isSeparator() const
Returns true if this action is a separator action; otherwise it returns false.
See also QAction::setSeparator().
Upstream PySide2 reference signatures (binding differences may apply):
isSeparator(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#isSeparator
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/qaction.html#isVisible
menu
menu() -> Any
X.menu() -> PythonQt.QtGui.QMenu
Supplemental documentation: Qt 5 reference:
QMenu *QAction::menu() const
Returns the menu contained by this action. Actions that contain menus can be used to create menu items with submenus, or inserted into toolbars to create buttons with popup menus.
See also setMenu() and QMenu::addAction().
Upstream PySide2 reference signatures (binding differences may apply):
menu(self) -> PySide2.QtWidgets.QMenu
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#menu
menuRole
instance-attribute
menuRole: Any
Qt 5 reference:
menuRole : MenuRole
This property holds the action's menu role
This indicates what role the action serves in the application menu on macOS. By default all actions have the TextHeuristicRole, which means that the action is added based on its text (see QMenuBar for more information).
The menu role can only be changed before the actions are put into the menu bar in macOS (usually just before the first application window is shown).
This property was introduced in Qt 4.2.
Access functions:
| QAction::MenuRole | menuRole() const |
|---|---|
| void | setMenuRole(QAction::MenuRole menuRole) |
Notifier signal:
| void | changed() |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qaction.html#menuRole
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAction.objectNameChanged; argument details are not documented.