QChildEvent¶
The
QChildEvent
class contains event parameters for child object events. More…

Detailed Description¶
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
QObject
(or, ifisWidgetType()
returnstrue
, aQWidget
). This is because in theChildAdded
case the child is not yet fully constructed; in theChildRemoved
case it might have already been destructed.The handler for these events is
childEvent()
.
-
class
QChildEvent
(type, child)¶ - param type
Type
- param child
Constructs a child event object of a particular
type
for thechild
.type
can beChildAdded
,ChildRemoved
, orChildPolished
.See also
-
PySide2.QtCore.QChildEvent.
added
()¶ - Return type
bool
Returns
true
iftype()
isChildAdded
; otherwise returns false.
-
PySide2.QtCore.QChildEvent.
child
()¶ - Return type
Returns the child object that was added or removed.