PDA

View Full Version : qApp->quit() deletes all its children?



zgulser
7th April 2012, 23:32
Hi,

qApp->quit() delete qApp right? So it means it deletes qApp's children(those who set qApp as their parent) as well?

Thanks

d_stranz
8th April 2012, 00:32
QApplication is usually created on the stack, in main(), so when main() exits, the QApplication instance is destroyed. If there are any children of QApplication, then they are destroyed as part of the QApplication destruction.

The global pointer "qApp" is just a pointer to the instance of QApplication that was created on the stack.