mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Connect ExitAction
This commit is contained in:
parent
61e566e318
commit
2743568cef
@ -218,5 +218,4 @@ void KiwixApp::createAction()
|
|||||||
|
|
||||||
CREATE_ACTION_ICON(ExitAction, "exit", "Exit");
|
CREATE_ACTION_ICON(ExitAction, "exit", "Exit");
|
||||||
SET_SHORTCUT(ExitAction, QKeySequence::Quit);
|
SET_SHORTCUT(ExitAction, QKeySequence::Quit);
|
||||||
DISABLE_ACTION(ExitAction);
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
mp_ui->setupUi(this);
|
mp_ui->setupUi(this);
|
||||||
mp_ui->tabWidget->tabBar()->setExpanding(false);
|
mp_ui->tabWidget->tabBar()->setExpanding(false);
|
||||||
|
auto app = KiwixApp::instance();
|
||||||
|
connect(app->getAction(KiwixApp::ExitAction), &QAction::triggered,
|
||||||
|
this, &QMainWindow::close);
|
||||||
#if !SYSTEMTITLEBAR
|
#if !SYSTEMTITLEBAR
|
||||||
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user