From df24961c0d45324705fc9f70b2ff03fc490dd777 Mon Sep 17 00:00:00 2001 From: Skye Deving <76892045+skyedeving@users.noreply.github.com> Date: Thu, 7 Jan 2021 23:31:08 -0600 Subject: [PATCH] Set delete on close attribute for orphaned widgets --- src/debug_functions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/debug_functions.cpp b/src/debug_functions.cpp index 477eec7..1613a7d 100644 --- a/src/debug_functions.cpp +++ b/src/debug_functions.cpp @@ -9,6 +9,7 @@ void call_error(QString p_message) { QMessageBox *msgBox = new QMessageBox; + msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(QCoreApplication::translate("debug_functions", "Error: %1") .arg(p_message)); msgBox->setWindowTitle( @@ -22,6 +23,7 @@ void call_notice(QString p_message) { QMessageBox *msgBox = new QMessageBox; + msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setText(p_message); msgBox->setWindowTitle( QCoreApplication::translate("debug_functions", "Notice"));