From 461872b7ea6d8864a5505dca4c7c355cfbd88bb3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 25 Apr 2014 10:27:44 -0700 Subject: Print dialog: make Ctrl-Q and Ctlr-W work All these recent commits should have included: See #489 Signed-off-by: Dirk Hohndel --- qt-ui/printdialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 331a78dac..488afb55d 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -10,6 +10,7 @@ #include #include #include +#include PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) { @@ -57,6 +58,11 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f setFixedSize(550, 400); setWindowTitle(tr("Print")); setWindowIcon(QIcon(":subsurface-icon")); + + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } void PrintDialog::previewClicked(void) -- cgit v1.2.3-70-g09d2