Actually it's not an extra thread, but just a nested event loop. QMessageBox is a modal dialog which runs its own event loop. Once the message box is closed, execution returns to the "main" event loop. These both event loops are running in the same thread and all events gets processed meanwhile either event loop is running.