The main window object is on the heap, the QApplication on the stack, but there shouldn't be a leak there or the tool would say so (well, maybe not, it's obviously not perfect). Here's the stripped down code from my main:
int main(int argc, char *argv[])
{
MainWindow *diag = new MainWindow();
diag->show();
int iReturn = app.exec();
delete diag;
return iReturn;
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow *diag = new MainWindow();
diag->show();
int iReturn = app.exec();
delete diag;
return iReturn;
}
To copy to clipboard, switch view to plain text mode
Bookmarks