mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:03:24 +00:00
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>
This commit is contained in:
parent
0aa8b7f47d
commit
b068ae6019
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue