Probably it does not enter the destructor yet.
Either use setAttribute(Qt::WA_DeleteOnClose) in the constructor of the main window.
Or:
Override the main window's close event, and do that there.
{
if(gameViewer)
{
gameViewer->close();
delete gameViewer; //you also have to delete it manually, since it does not have a parent
}
}
MainWindow::closeEvent(QCloseEvent*)
{
if(gameViewer)
{
gameViewer->close();
delete gameViewer; //you also have to delete it manually, since it does not have a parent
}
}
To copy to clipboard, switch view to plain text mode
Regards
Bookmarks