Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
When you call this->setCentralWidget(NULL) does it call the destructor?
tmason101 last edited by
As the title suggests, I would like to know if calling this->setCentralWidget(NULL) calls the deconstructor for the widget currently set as the central widget of the container.
andreyc last edited by
According to the "sources":http://code.woboq.org/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp.html#_ZN11QMainWindow16setCentralWidgetEP7QWidget and "doc":http://qt-project.org/doc/qt-5/qmainwindow.html#setCentralWidget yes setCentralWidget deletes a previous widget and calls its destructor.