Add Exit to file menu
This commit is contained in:
parent
35d566fd2d
commit
bb0397cc2d
1 changed files with 8 additions and 0 deletions
|
@ -22,9 +22,17 @@ void MemoservWin::create_menu(QApplication* app) {
|
||||||
{
|
{
|
||||||
const QIcon open_icon = QIcon::fromTheme("document-open", QIcon(":/images/open.png"));
|
const QIcon open_icon = QIcon::fromTheme("document-open", QIcon(":/images/open.png"));
|
||||||
const auto open_act = new QAction(open_icon, tr("&Open..."), this);
|
const auto open_act = new QAction(open_icon, tr("&Open..."), this);
|
||||||
|
open_act->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O));
|
||||||
connect(open_act, &QAction::triggered, this, &MemoservWin::open);
|
connect(open_act, &QAction::triggered, this, &MemoservWin::open);
|
||||||
file_menu->addAction(open_act);
|
file_menu->addAction(open_act);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
const QIcon quit_icon = QIcon::fromTheme("application-exit");
|
||||||
|
const auto quit_act = new QAction(quit_icon, tr("E&xit"), this);
|
||||||
|
quit_act->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
|
||||||
|
connect(quit_act, &QAction::triggered, [this](){this->close();});
|
||||||
|
file_menu->addAction(quit_act);
|
||||||
|
}
|
||||||
|
|
||||||
QMenu* const help_menu = menuBar()->addMenu(tr("&Help"));
|
QMenu* const help_menu = menuBar()->addMenu(tr("&Help"));
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue