Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Does .close() activate the destructor of a form class?
Cube777 last edited by
Hi, when you create a new instance of a form using the @new@ function, does running @this->close()@ activate the destructor of the formclass and thus deleting the form from the heap? Thanks for the help!
chrisaverage last edited by
Hi, welcome to devnet,
By default no, because how is it suppose to know if it's a heap or stack variable?
If you want that behavior then you can set a Qt::WA_DeleteOnClose attribute on your widget.