documentwindow: Add Quit menu item.

master
Karl Robillard 2019-12-29 13:40:58 -05:00
parent d2862b9e50
commit d02331d1e7
2 changed files with 5 additions and 0 deletions

View File

@ -506,6 +506,10 @@ DocumentWindow::DocumentWindow() :
m_fileMenu->addSeparator(); m_fileMenu->addSeparator();
m_quitAction = m_fileMenu->addAction(tr("&Quit"),
this, &DocumentWindow::close,
QKeySequence::Quit);
connect(m_fileMenu, &QMenu::aboutToShow, [=]() { connect(m_fileMenu, &QMenu::aboutToShow, [=]() {
m_exportAsObjAction->setEnabled(m_graphicsWidget->hasItems()); m_exportAsObjAction->setEnabled(m_graphicsWidget->hasItems());
//m_exportAsObjPlusMaterialsAction->setEnabled(m_graphicsWidget->hasItems()); //m_exportAsObjPlusMaterialsAction->setEnabled(m_graphicsWidget->hasItems());

View File

@ -118,6 +118,7 @@ private:
QAction *m_showPreferencesAction; QAction *m_showPreferencesAction;
QMenu *m_exportMenu; QMenu *m_exportMenu;
QAction *m_changeTurnaroundAction; QAction *m_changeTurnaroundAction;
QAction *m_quitAction;
QAction *m_exportAsObjAction; QAction *m_exportAsObjAction;
QAction *m_exportAsObjPlusMaterialsAction; QAction *m_exportAsObjPlusMaterialsAction;