I set the WA_DeleteOnClose widget WA_DeleteOnClose to MainWindow.
setAttribute(Qt::WA_DeleteOnClose);
However, when I close this main window, I get segfault in its destructor, which has only delete ui;
In short, by creating a Qt4 GUI application in Creator by adding the setAttribute(Qt::WA_DeleteOnClose); constructor setAttribute(Qt::WA_DeleteOnClose); to the constructor, the program now crashes on exit.
c ++ segmentation-fault qt qt4
Jake petroules
source share