Added exit action

This commit is contained in:
Pierre HUBERT 2019-01-15 09:08:34 +01:00
parent 23fb569e5e
commit 3a1cc0f211
3 changed files with 19 additions and 0 deletions

View File

@ -60,3 +60,8 @@ void MainWindow::on_actionLogout_triggered()
//Close this widget //Close this widget
close(); close();
} }
void MainWindow::on_actionExit_triggered()
{
QCoreApplication::exit(0);
}

View File

@ -44,6 +44,8 @@ private slots:
void on_actionLogout_triggered(); void on_actionLogout_triggered();
void on_actionExit_triggered();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
ConversationsListWidget *mConversationsListWidget; ConversationsListWidget *mConversationsListWidget;

View File

@ -63,6 +63,13 @@
<addaction name="actionAbout_this_App"/> <addaction name="actionAbout_this_App"/>
<addaction name="actionAbout_Qt"/> <addaction name="actionAbout_Qt"/>
</widget> </widget>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionExit"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuAccount"/> <addaction name="menuAccount"/>
<addaction name="menuHelp"/> <addaction name="menuHelp"/>
</widget> </widget>
@ -82,6 +89,11 @@
<string>Logout</string> <string>Logout</string>
</property> </property>
</action> </action>
<action name="actionExit">
<property name="text">
<string>Exit</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="../res/ressources.qrc"/> <include location="../res/ressources.qrc"/>