From c6542a47f8330b506d662eed42ead2732bfa3170 Mon Sep 17 00:00:00 2001 From: Dman95 Date: Mon, 13 Feb 2023 15:28:12 +0300 Subject: [PATCH] Add help close by Escape --- mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 21de161..b7fa0b4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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(); }