Creating and destroying non-modal dialogs
-
The simplest description of my question is following. Suppose on the main window there is a single button. Each pressing of the button leads to the creation of another non-modal dialog (QDialog). The user opens and closes dialogs in random order. Since I create dialogs using the new operator and not control the moment of the dialog window closing, I worry about the memory leakage. Any comments please!
-
Hi
There is a flag for that use case
diag->setAttribute(Qt::WA_DeleteOnClose);It will make it delete it self when close() is called.