diff options
author | Gehad <gehadelrobey@gmail.com> | 2014-04-25 17:54:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-25 09:03:11 -0700 |
commit | e253ec66d61476ab518ef475e42e9989e3af58d3 (patch) | |
tree | b3f5bf861ff182d85088a1ce9724ce7f568239c5 /qt-ui | |
parent | 48b8cbadf76dd3fdac3f9a2cbe6bfa01e9920a3d (diff) | |
download | subsurface-e253ec66d61476ab518ef475e42e9989e3af58d3.tar.gz |
Closing about window by shortcut
This adds the ability to close the about window with the ctrl + w
shortcut.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/about.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/about.cpp b/qt-ui/about.cpp index c94d17ade..4a3c2fbd3 100644 --- a/qt-ui/about.cpp +++ b/qt-ui/about.cpp @@ -2,6 +2,7 @@ #include "ssrf-version.h" #include <QDesktopServices> #include <QUrl> +#include <QShortcut> SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) { @@ -15,6 +16,9 @@ SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(p "<span style='font-size: 8pt'>" "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others, 2011-2014" "</span>").arg(VERSION_STRING)); + + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); } void SubsurfaceAbout::on_licenseButton_clicked() |