From 3a6963836682aa0e0e2825db4eaac7ea48a9939b Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Fri, 10 Jul 2015 21:30:18 +0200 Subject: Printing: check for different printing modes Add PRINT/PREVIEW print modes, check for printing modes before casting. We must pass a QPaintDevice with type QPixmap for previewing and with type QPrinter for actual printing. Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- qt-ui/printdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/printdialog.cpp') diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 9ff29e67b..0a2c7898f 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -45,7 +45,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f optionsWidget = new PrintOptions(this, &printOptions, &templateOptions); // create a new printer object - printer = new Printer(&qprinter, &printOptions, &templateOptions); + printer = new Printer(&qprinter, &printOptions, &templateOptions, Printer::PRINT); QVBoxLayout *layout = new QVBoxLayout(this); setLayout(layout); -- cgit v1.2.3-70-g09d2