When you close a window, it is not being destroyed. You either should create the dialog on the stack and use QDialog::exec() to make it modal, delete the dialog manually or set the Qt::WA_DeleteOnClose attribute on the dialog so that it gets deleted after being closed.
Bookmarks