summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar John Van Ostrand <john@vanostrand.com>2014-10-30 10:44:21 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-30 07:47:06 -0700
commit0996908dd8eb4e630f32529212cd54fa2cc3c35d (patch)
tree3fc8f760dadd3d927ddcaa438649074bfc7e300c /qt-ui
parentb2af700a428c83bc0417e4217f5aee3273d74a2f (diff)
downloadsubsurface-0996908dd8eb4e630f32529212cd54fa2cc3c35d.tar.gz
Added close button to print preview window title bar.
Without this I was only able to close it by choosing to print. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printdialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index f8f06aead..a65078bf2 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -68,7 +68,10 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
void PrintDialog::previewClicked(void)
{
- QPrintPreviewDialog previewDialog(&printer, this);
+ QPrintPreviewDialog previewDialog(&printer, this, Qt::Window
+ | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint
+ | Qt::WindowTitleHint);
+
connect(&previewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(onPaintRequested(QPrinter *)));
previewDialog.exec();
}