From 0996908dd8eb4e630f32529212cd54fa2cc3c35d Mon Sep 17 00:00:00 2001 From: John Van Ostrand Date: Thu, 30 Oct 2014 10:44:21 -0400 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/printdialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- cgit v1.2.3-70-g09d2