This signal is emitted from QApplication::exec() when the last visible primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose attribute set is closed.
this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus
QApplication implicitly quits when this signal is emitted.
This feature be turned off by setting quitOnLastWindowClosed to false.