No it's not and that on purpose so that if there is a brief period with no active widget, the event is remove again:
@
void QApplicationPrivate::emitLastWindowClosed()
{
if (qApp && qApp->d_func()->in_exec) {
if (QApplicationPrivate::quitOnLastWindowClosed) {
// get ready to quit, this event might be removed if the
// event loop is re-entered, however
QApplication::postEvent(qApp, new QEvent(QEvent::Quit));
}
emit qApp->lastWindowClosed();
}
}
@
EDIT: To explain (I'm sure @Gerolf, you know what this means, but now everybody reading this thread will), the close event on QApplication is one executed directly (which would be sendEvent()), but postponed until the eventLoop is run next, in order to give QWidget a chance to remove it again.