Table Of Contents

Previous topic

QDynamicPropertyChangeEvent

Next topic

QTimerEvent

QChildEvent

Inheritance diagram of QChildEvent

Synopsis

Functions

Detailed Description

The PySide.QtCore.QChildEvent class contains event parameters for child object events.

Child events are sent immediately to objects when children are added or removed.

In both cases you can only rely on the child being a PySide.QtCore.QObject (or, if QObject.isWidgetType() returns true, a PySide.QtGui.QWidget ). This is because in the QEvent.ChildAdded case the child is not yet fully constructed; in the QEvent.ChildRemoved case it might have already been destructed.

The handler for these events is QObject.childEvent() .

class PySide.QtCore.QChildEvent(type, child)
Parameters:

Constructs a child event object of a particular type for the child .

type can be QEvent.ChildAdded , QEvent.ChildRemoved , QEvent.ChildPolished , or QEvent.ChildRemoved .

PySide.QtCore.QChildEvent.added()
Return type:PySide.QtCore.bool

Returns true if PySide.QtCore.QEvent.type() is QEvent.ChildAdded ; otherwise returns false.

PySide.QtCore.QChildEvent.child()
Return type:PySide.QtCore.QObject

Returns the child object that was added or removed.

PySide.QtCore.QChildEvent.polished()
Return type:PySide.QtCore.bool

Returns true if PySide.QtCore.QEvent.type() is QEvent.ChildPolished ; otherwise returns false.

PySide.QtCore.QChildEvent.removed()
Return type:PySide.QtCore.bool

Returns true if PySide.QtCore.QEvent.type() is QEvent.ChildRemoved ; otherwise returns false.