Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QObject::childEvent ( QChildEvent  )  [protected, virtual, inherited]

This event handler can be reimplemented in a subclass to receive child events. The event is passed in the event parameter.

QEvent::ChildAdded and QEvent::ChildRemoved events are sent to objects when children are added or removed. In both cases you can only rely on the child being a QObject, or if isWidgetType() returns true, a QWidget. (This is because, in the {QEvent::ChildAdded}{ChildAdded} case, the child is not yet fully constructed, and in the {QEvent::ChildRemoved}{ChildRemoved} case it might have been destructed already).

QEvent::ChildPolished events are sent to widgets when children are polished, or when polished children are added. If you receive a child polished event, the child's construction is usually completed.

For every child widget, you receive one {QEvent::ChildAdded}{ChildAdded} event, zero or more {QEvent::ChildPolished}{ChildPolished} events, and one {QEvent::ChildRemoved}{ChildRemoved} event.

The {QEvent::ChildPolished}{ChildPolished} event is omitted if a child is removed immediately after it is added. If a child is polished several times during construction and destruction, you may receive several child polished events for the same child, each time with a different virtual table.

See also:
event()

Reimplemented in QLayout, QGroupBox, QMdiArea, QMdiSubWindow, QSplitter, QToolBar, QWorkspace, Q3ActionGroup, Q3GroupBox, Q3MainWindow, and Q3WidgetStack.

Definition at line 1222 of file qobject.cpp.

Referenced by QToolBar::childEvent(), and QObject::event().

{
}


Generated by  Doxygen 1.6.0   Back to index