Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Dec 1, 2024
1 parent cec0b05 commit 68361f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
};
Expand Down

0 comments on commit 68361f5

Please sign in to comment.