From d02331d1e7f39687a1002fa29d8f692d9ba7ba32 Mon Sep 17 00:00:00 2001 From: Karl Robillard Date: Sun, 29 Dec 2019 13:40:58 -0500 Subject: [PATCH] documentwindow: Add Quit menu item. --- src/documentwindow.cpp | 4 ++++ src/documentwindow.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/documentwindow.cpp b/src/documentwindow.cpp index 0c3ca330..f6166e6c 100644 --- a/src/documentwindow.cpp +++ b/src/documentwindow.cpp @@ -506,6 +506,10 @@ DocumentWindow::DocumentWindow() : m_fileMenu->addSeparator(); + m_quitAction = m_fileMenu->addAction(tr("&Quit"), + this, &DocumentWindow::close, + QKeySequence::Quit); + connect(m_fileMenu, &QMenu::aboutToShow, [=]() { m_exportAsObjAction->setEnabled(m_graphicsWidget->hasItems()); //m_exportAsObjPlusMaterialsAction->setEnabled(m_graphicsWidget->hasItems()); diff --git a/src/documentwindow.h b/src/documentwindow.h index 6073f4a6..4c051aab 100644 --- a/src/documentwindow.h +++ b/src/documentwindow.h @@ -118,6 +118,7 @@ private: QAction *m_showPreferencesAction; QMenu *m_exportMenu; QAction *m_changeTurnaroundAction; + QAction *m_quitAction; QAction *m_exportAsObjAction; QAction *m_exportAsObjPlusMaterialsAction;