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 <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
committed by
Lubomir I. Ivanov
parent
142fd950c8
commit
3a69638366
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user