Hi, at the moment I am working on a small game using Qt. It should stay quite simple, so I use QMainWindow for my main menu. From the menu you can open some QDialogs via pushButtons. I use the on_pushButton_clicked event to create a new object of the QDialog class and execute it.
Because I want the dialogs to be modal, I show them with exec() and close them via close().
To get no problems with the memory, I set the flag of every Dialog to Qt::WA_DeleteOnClose, to get sure to delete it. The problem is, everytime I close one, the program crashes.
Without setting the flag, it works perfectly fine.
Do you think its neccessary to delete them?
Thanks for your help
Bookmarks