PySide6.QtCore.QChildEvent¶
- class QChildEvent¶
The
QChildEventclass contains event parameters for child object events.Details
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, a QWidget). This is because in theChildAddedcase the child is not yet fully constructed; in theChildRemovedcase it might have already been destructed.The handler for these events is
childEvent().Synopsis¶
Methods¶
def
__init__()def
added()def
child()def
polished()def
removed()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__(arg__1)¶
- Parameters:
arg__1 –
QChildEvent
Constructs a child event object of a particular
typefor thechild.typecan beChildAdded,ChildRemoved, orChildPolished.See also
- added()¶
- Return type:
bool
Returns
trueiftype()isChildAdded; otherwise returns false.Returns the child object that was added or removed.
- polished()¶
- Return type:
bool
Returns
trueiftype()isChildPolished; otherwise returns false.- removed()¶
- Return type:
bool
Returns
trueiftype()isChildRemoved; otherwise returns false.