diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-04-25 10:27:44 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-25 10:27:44 -0700 |
commit | 461872b7ea6d8864a5505dca4c7c355cfbd88bb3 (patch) | |
tree | 9b596274aaac91a20ced7f5fc68c3e5d9a1b1533 | |
parent | 5eeb9ebb5df889b4a98e1f2deeb6f0bdefedcfe4 (diff) | |
download | subsurface-461872b7ea6d8864a5505dca4c7c355cfbd88bb3.tar.gz |
Print dialog: make Ctrl-Q and Ctlr-W work
All these recent commits should have included:
See #489
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/printdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <QHBoxLayout> #include <QPrintPreviewDialog> #include <QPrintDialog> +#include <QShortcut> 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) |