内容表

上一话题

QAccessibleValueInterface

下一话题

QBackingStore

QActionEvent

QActionEvent class provides an event that is generated when a QAction 被添加、被移除或被改变时。 更多

Inheritance diagram of PySide2.QtGui.QActionEvent

概要

函数

详细描述

动作可以被添加到 Widget,使用 addAction() . This generates an ActionAdded event, which you can handle to provide custom behavior. For example, QToolBar reimplements actionEvent() to create QToolButton s for the actions.

另请参阅

QAction addAction() removeAction() actions()

class QActionEvent ( type , action [ , before=None ] )
param type

int

param before

QAction

param action

QAction

构造动作事件。 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 None , the action is appended.

PySide2.QtGui.QActionEvent. action ( )
返回类型

QAction

返回被改变、被添加或被被删除的动作。

另请参阅

before()

PySide2.QtGui.QActionEvent. before ( )
返回类型

QAction

type() is ActionAdded , returns the action that should appear before action() 。若此函数返回 None , the action should be appended to already existing actions on the same widget.

另请参阅

action() actions()