This is because the signal / slot system works as function calls (with the addition of a “connection” mechanism), as indicated in the Qt Documentation on Signals and Slots .
, , , , , , . , closeEvent, , , , , .
, A . , ( vahancho).
: , , A cleanup. B A, , ( , , A , , , ). cleanup - A , :
, , , Qt::DirectConnection . , , , ( connect Qt::AutoConnection, , .. , )
Qt::QueuedConnection Qt::AutoConnection, undefined, , . A,