QActionEvent¶
The
QActionEvent
class provides an event that is generated when aQAction
is added, removed, or changed. More…
Synopsis¶
Functions¶
Detailed Description¶
Actions can be added to widgets using
addAction()
. This generates anActionAdded
event, which you can handle to provide custom behavior. For example,QToolBar
reimplementsactionEvent()
to createQToolButton
s for the actions.See also
QAction
addAction()
removeAction()
actions()
- class PySide2.QtGui.QActionEvent(type, action[, before=None])¶
- param type:
int
- param before:
- param action:
Constructs an action event. The
type
can beActionChanged
,ActionAdded
, orActionRemoved
.action
is the action that is changed, added, or removed. Iftype
isActionAdded
, the action is to be inserted before the actionbefore
. Ifbefore
isNone
, the action is appended.
- PySide2.QtGui.QActionEvent.action()¶
- Return type:
Returns the action that is changed, added, or removed.
See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.