From e253ec66d61476ab518ef475e42e9989e3af58d3 Mon Sep 17 00:00:00 2001 From: Gehad Date: Fri, 25 Apr 2014 17:54:01 +0200 Subject: Closing about window by shortcut This adds the ability to close the about window with the ctrl + w shortcut. Signed-off-by: Gehad elrobey Signed-off-by: Dirk Hohndel --- qt-ui/about.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 #include +#include SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) { @@ -15,6 +16,9 @@ SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(p "" "Linus Torvalds, Dirk Hohndel, Tomaz Canabrava, and others, 2011-2014" "").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() -- cgit v1.2.3-70-g09d2