[QtCore module]
该QChildEvent类包含事件参数的子对象的事件。More…
继承QEvent。
Methods
__init__ (self, QEvent.Type type, QObject child)
__init__ (self, QChildEvent)
bool added (self)
QObject child (self)
bool polished (self)
bool removed (self)
Detailed Description
该QChildEvent类包含事件参数的子对象的事件。
孩子的事件会立即发送到对象时,孩子们被添加或删除。
在这两种情况下,你只能依靠孩子作为一个QObject(或者,如果QObject.isWidgetType( )返回True ,一QWidget) 。这是因为在QEvent.ChildAdded区分孩子还没有完全建成,而在QEvent.ChildRemoved情况下,它可能已被破坏。
该处理器为这些事件是QObject.childEvent( ) 。
Method Documentation
QChildEvent.__init__ (self, QEvent.Type type, QObject child)
构建了一个特定的子事件对象type为child。
type可以QEvent.ChildAdded,QEvent.ChildRemoved,QEvent.ChildPolished或QEvent.ChildRemoved。
See also child( ) 。
QChildEvent.__init__ (self, QChildEvent)
bool QChildEvent.added (self)
返回True如果type()是QEvent.ChildAdded否则返回False 。
QObject QChildEvent.child (self)
[
返回已添加或删除的子对象。
bool QChildEvent.polished (self)
](docs_qobject.html)
返回True如果type()是QEvent.ChildPolished否则返回False 。
bool QChildEvent.removed (self)
返回True如果type()是QEvent.ChildRemoved否则返回False 。