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>
This commit is contained in:
John Van Ostrand 2014-10-30 10:44:21 -04:00 committed by Dirk Hohndel
parent b2af700a42
commit 0996908dd8

View file

@ -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();
}