• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QFileOpenEvent

    下一话题

    QWhatsThisClickedEvent

    QActionEvent

    概要

    函数

    详细描述

    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.

    class PySide.QtGui. QActionEvent ( type , action [ , before=None ] )
    参数:

    构造动作事件。 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.QActionEvent. action ( )
    返回类型: PySide.QtGui.QAction

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

    PySide.QtGui.QActionEvent. before ( )
    返回类型: 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.