When setting the WA_DeleteOnClose attribute on a Qt MainWindow, the program crashes when deleting the ui pointer
Are you getting a segfault in its destructor the first time, or the second time? Remember that your main window destructor should run only once. That is to say that it should run either because of a stack unwind, or because of WA_DeleteOnClose
, not both.
IIRC, Creator will put the main window on the stack of main()
. Therefore, when main()
returns the main window is destroyed.