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(); }); };