summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/printdialog.cpp6
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)