Skip to content

Commit

Permalink
Add help close by Escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Dman95 committed Feb 13, 2023
1 parent 61b98a6 commit c6542a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,12 @@ void MainWindow::openHelp()
help->setOpenExternalLinks(true);
help->setWindowTitle(tr("Help"));
help->setWindowIcon(QIcon(":images/mainIcon.png"));

QAction *closeHelpAction = new QAction(tr("Close help"), help);
closeHelpAction->setShortcut(QKeySequence(Qt::Key_Escape));
connect(closeHelpAction, SIGNAL(triggered()), help, SLOT(close()));
help->addAction(closeHelpAction);

help->show();
}

Expand Down

0 comments on commit c6542a4

Please sign in to comment.