From 68361f569ab1776fcd0a15571e162042a4e315db Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Sun, 1 Dec 2024 15:08:20 -0500 Subject: [PATCH] Test --- main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d1546400..020d725e 100755 --- a/main.cpp +++ b/main.cpp @@ -8,7 +8,14 @@ class MainWindow : public QMainWindow { setAcceptDrops(true); grabGesture(Qt::PinchGesture); setMouseTracking(true); - QTimer::singleShot(1000, this, []() { + QTimer::singleShot(1000, this, [this]() { + QMessageBox msgBox {this}; + msgBox.setWindowModality(Qt::ApplicationModal); + msgBox.setWindowTitle("Quitting"); + msgBox.setText("The application will quit now."); + QPushButton *okButton = msgBox.addButton("Ok", QMessageBox::YesRole); + msgBox.setDefaultButton(okButton); + msgBox.exec(); QCoreApplication::quit(); }); };