From 3a1cc0f21180a41f738e8e691ada8da937bc2019 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 15 Jan 2019 09:08:34 +0100 Subject: [PATCH] Added exit action --- src/widgets/mainwindow.cpp | 5 +++++ src/widgets/mainwindow.h | 2 ++ src/widgets/mainwindow.ui | 12 ++++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/widgets/mainwindow.cpp b/src/widgets/mainwindow.cpp index eeddfe1..1290856 100644 --- a/src/widgets/mainwindow.cpp +++ b/src/widgets/mainwindow.cpp @@ -60,3 +60,8 @@ void MainWindow::on_actionLogout_triggered() //Close this widget close(); } + +void MainWindow::on_actionExit_triggered() +{ + QCoreApplication::exit(0); +} diff --git a/src/widgets/mainwindow.h b/src/widgets/mainwindow.h index ff2654b..5039f4a 100644 --- a/src/widgets/mainwindow.h +++ b/src/widgets/mainwindow.h @@ -44,6 +44,8 @@ private slots: void on_actionLogout_triggered(); + void on_actionExit_triggered(); + private: Ui::MainWindow *ui; ConversationsListWidget *mConversationsListWidget; diff --git a/src/widgets/mainwindow.ui b/src/widgets/mainwindow.ui index 445787f..cb6de54 100644 --- a/src/widgets/mainwindow.ui +++ b/src/widgets/mainwindow.ui @@ -63,6 +63,13 @@ + + + File + + + + @@ -82,6 +89,11 @@ Logout + + + Exit + +