mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 19:23:25 +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 <QDesktopServices>
|
||||||
|
#include <QShortcut>
|
||||||
|
|
||||||
#include "usermanual.h"
|
#include "usermanual.h"
|
||||||
#include "ui_usermanual.h"
|
#include "ui_usermanual.h"
|
||||||
|
@ -10,6 +11,9 @@ UserManual::UserManual(QWidget *parent) : QMainWindow(parent),
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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);
|
QAction *actionShowSearch = new QAction(this);
|
||||||
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);
|
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);
|
||||||
actionShowSearch->setShortcutContext(Qt::WindowShortcut);
|
actionShowSearch->setShortcutContext(Qt::WindowShortcut);
|
||||||
|
|
Loading…
Add table
Reference in a new issue