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

void QObject::deleteLater (  )  [slot, inherited]

Schedules this object for deletion.

The object will be deleted when control returns to the event loop.

Note that entering and leaving a new event loop (e.g., by opening a modal dialog) will not perform the deferred deletion; for the object to be deleted, the control must return to the event loop from which deleteLater() was called.

{Note:} It is safe to call this function more than once; when the first deferred deletion event is delivered, any pending events for the object are removed from the event queue.

See also:
destroyed(), QPointer

Definition at line 2006 of file qobject.cpp.

References QCoreApplication::postEvent().

Referenced by Q3Table::clearCellWidget(), and QWidgetAction::deleteWidget().

{
    QCoreApplication::postEvent(this, new QEvent(QEvent::DeferredDelete));
}


Generated by  Doxygen 1.6.0   Back to index