Skip to content

Commit c6542a4

Browse files
committed
Add help close by Escape
1 parent 61b98a6 commit c6542a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mainwindow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,6 +2248,12 @@ void MainWindow::openHelp()
22482248
help->setOpenExternalLinks(true);
22492249
help->setWindowTitle(tr("Help"));
22502250
help->setWindowIcon(QIcon(":images/mainIcon.png"));
2251+
2252+
QAction *closeHelpAction = new QAction(tr("Close help"), help);
2253+
closeHelpAction->setShortcut(QKeySequence(Qt::Key_Escape));
2254+
connect(closeHelpAction, SIGNAL(triggered()), help, SLOT(close()));
2255+
help->addAction(closeHelpAction);
2256+
22512257
help->show();
22522258
}
22532259

0 commit comments

Comments
 (0)