Adjusted exit action

This commit is contained in:
Jesse Qu 2025-05-29 10:11:03 +08:00
parent 15b1db4bb6
commit 08ece7a7f6
3 changed files with 18 additions and 0 deletions

View File

@ -17,6 +17,9 @@ public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_actionExit_triggered();
private:
Ui::MainWindow *ui;
};

View File

@ -16,3 +16,9 @@ MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_actionExit_triggered()
{
close();
}

View File

@ -74,6 +74,9 @@
<property name="text">
<string>&amp;About</string>
</property>
<property name="shortcut">
<string>Ctrl+I</string>
</property>
</action>
<action name="actionExit">
<property name="icon">
@ -82,6 +85,12 @@
<property name="text">
<string>E&amp;xit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::QuitRole</enum>
</property>
</action>
</widget>
<resources/>