Home · All Classes · Modules  · QSS HELP  · QSS 案例 · VER007 HOME

QActionEvent Class Reference
[QtGui module]

该QActionEvent类提供了产生一个事件时,QAction添加,删除或更改。More...

继承QEvent

Methods


Detailed Description

该QActionEvent类提供了产生一个事件时,QAction添加,删除或更改。

操作可以使用被添加到小部件QWidget.addAction( ) 。这将生成一个ActionAdded事件,您可以处理,以提供自定义行为。例如,QToolBar重新实现QWidget.actionEvent( )来创建QToolButtonS为行动。


Method Documentation

QActionEvent.__init__ (self, int type, QAction action, QAction before = None)

构造一个动作事件。该type可以ActionChangedActionAddedActionRemoved

action是改变的动作,添加或删除。如果type is ActionAdded,动作是动作之前插入before。如果before为0时,动作被追加。

QActionEvent.__init__ (self, QActionEvent)

QAction QActionEvent.action (self)

返回更改,添加或删除的动作。

See also before( ) 。

QAction QActionEvent.before (self)

If type()是ActionAdded,返回应该出现在这之前的动作action( ) 。如果这个函数返回0时,动作应被追加到已有的同一部件的动作。

See also action()和QWidget.actions( ) 。




PyQt 4.10.3 for X11 Copyright © Riverbank Computing Ltd and Nokia 2012 Qt 4.8.5