summaryrefslogtreecommitdiffstats
path: root/qt-ui/usermanual.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-04-24 23:58:58 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-25 07:19:18 -0700
commitb068ae6019982d20a17ca3f366a866c2ee24ee4c (patch)
tree761d2a0b25dce0312c71e687c763bcf3d704b057 /qt-ui/usermanual.cpp
parent0aa8b7f47d1122764dcd979774b912ee7936f160 (diff)
downloadsubsurface-b068ae6019982d20a17ca3f366a866c2ee24ee4c.tar.gz
Close user manual window shortcut
Add ability to close the user manual window with a Ctrl-W shortcut. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/usermanual.cpp')
-rw-r--r--qt-ui/usermanual.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/usermanual.cpp b/qt-ui/usermanual.cpp
index 58cc82f7f..aff9cc1ed 100644
--- a/qt-ui/usermanual.cpp
+++ b/qt-ui/usermanual.cpp
@@ -1,4 +1,5 @@
#include <QDesktopServices>
+#include <QShortcut>
#include "usermanual.h"
#include "ui_usermanual.h"
@@ -10,6 +11,9 @@ UserManual::UserManual(QWidget *parent) : QMainWindow(parent),
{
ui->setupUi(this);
+ QShortcut* closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
+ connect(closeKey, SIGNAL(activated()), this, SLOT(close()));
+
QAction *actionShowSearch = new QAction(this);
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);
actionShowSearch->setShortcutContext(Qt::WindowShortcut);