#include <qcoreevent.h>
Inheritance diagram for QChildEvent:


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, if QObject::isWidgetType() returns true, a 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().
Definition at line 264 of file qcoreevent.h.
Public Member Functions | |
| QChildEvent (Type type, QObject *child) | |
| ~QChildEvent () | |
| QObject * | child () const |
| bool | added () const |
| bool | polished () const |
| bool | removed () const |
Protected Attributes | |
| QObject * | c |
Constructs a child event object of a particular type for the child.
type can be QEvent::ChildAdded, QEvent::ChildRemoved, QEvent::ChildPolished, or QEvent::ChildRemoved.
Definition at line 362 of file qcoreevent.cpp.
| QChildEvent::~QChildEvent | ( | ) |
| QObject * QChildEvent::child | ( | ) | const [inline] |
Returns the child object that was added or removed.
Definition at line 269 of file qcoreevent.h.
References c.
Referenced by Q3MainWindow::childEvent(), QWorkspaceChild::childEvent(), Q3WidgetStack::childEvent(), QWorkspace::childEvent(), Q3ActionGroup::childEvent(), QHideDock::childEvent(), and QtWindowListMenu::eventFilter().
00269 { return c; }
| bool QChildEvent::added | ( | ) | const [inline] |
Returns true if type() is QEvent::ChildAdded; otherwise returns false.
Definition at line 270 of file qcoreevent.h.
References QEvent::type().
00270 { return type() == ChildAdded; }
Here is the call graph for this function:

| bool QChildEvent::polished | ( | ) | const [inline] |
Returns true if type() is QEvent::ChildPolished; otherwise returns false.
Definition at line 274 of file qcoreevent.h.
References QEvent::type().
00274 { return type() == ChildPolished; }
Here is the call graph for this function:

| bool QChildEvent::removed | ( | ) | const [inline] |
Returns true if type() is QEvent::ChildRemoved; otherwise returns false.
Definition at line 275 of file qcoreevent.h.
References QEvent::type().
Referenced by Q3WidgetStack::childEvent(), QWorkspace::childEvent(), and Q3ActionGroup::childEvent().
00275 { return type() == ChildRemoved; }
Here is the call graph for this function:

QObject* QChildEvent::c [protected] |
Definition at line 277 of file qcoreevent.h.
1.5.1