summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Gehad <gehadelrobey@gmail.com>2014-04-25 17:54:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-25 09:03:11 -0700
commite253ec66d61476ab518ef475e42e9989e3af58d3 (patch)
treeb3f5bf861ff182d85088a1ce9724ce7f568239c5 /qt-ui
parent48b8cbadf76dd3fdac3f9a2cbe6bfa01e9920a3d (diff)
downloadsubsurface-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.cpp4
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()