QActionEventclass provides an event that is generated when aQAction被添加、被移除或被改变时。 更多 …
动作可以被添加到 Widget,使用
addAction(). This generates anActionAddedevent, which you can handle to provide custom behavior. For example,QToolBarreimplementsactionEvent()to createQToolButtons for the actions.另请参阅
QActionaddAction()removeAction()actions()
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.