Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Dec 2, 2024
1 parent 68361f5 commit 3357218
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ class MainWindow : public QMainWindow {
public:
MainWindow(QWidget *parent = nullptr) : QMainWindow{parent} {
setWindowTitle("Test");
setCentralWidget(new QWidget(this));
setAttribute(Qt::WA_DeleteOnClose);
setAcceptDrops(true);
grabGesture(Qt::PinchGesture);
centralWidget()->grabGesture(Qt::PinchGesture);
setMouseTracking(true);
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();
QTimer::singleShot(1000, this, []() {
QCoreApplication::quit();
});
};
Expand Down

0 comments on commit 3357218

Please sign in to comment.