PySide.QtGui.QActionEvent class provides an event that is generated when a PySide.QtGui.QAction 被添加、被移除或被改变时。
动作可以被添加到 Widget,使用 QWidget.addAction() . This generates an ActionAdded event, which you can handle to provide custom behavior. For example, PySide.QtGui.QToolBar reimplements QWidget.actionEvent() to create PySide.QtGui.QToolButton s for the actions.
| 参数: |
|
|---|
构造动作事件。 type 可以是 ActionChanged , ActionAdded ,或 ActionRemoved .
action is the action that is changed, added, or removed. If type is ActionAdded , the action is to be inserted before the action before 。若 before is 0, the action is appended.
| 返回类型: | PySide.QtGui.QAction |
|---|
返回被改变、被添加或被被删除的动作。
| 返回类型: | PySide.QtGui.QAction |
|---|
若 PySide.QtCore.QEvent.type() is ActionAdded , returns the action that should appear before PySide.QtGui.QActionEvent.action() . If this function returns 0, the action should be appended to already existing actions on the same widget.