Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P3: Somewhat important
-
Resolution: Unresolved
-
Affects Version/s: 5.15.2
-
Fix Version/s: None
-
Component/s: GUI: Printing
-
Labels:None
-
Platform/s:
Description
I try open QPageSetupDialog, but if system does not have any printer, this dialog does not open and show this message: "QPageSetupDialog: Cannot be used on non-native printers"
I think this problem occurs because this dialog checks output format:
// qpagesetupdialog.cpp void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter) { // ... if (printer->outputFormat() != QPrinter::NativeFormat) qWarning("QPageSetupDialog: Cannot be used on non-native printers"); }
but I cannot add this format because QPrinter ignore it if system doesn't have printers.
// qprinter.cpp void QPrinter::setOutputFormat(OutputFormat format) { Q_D(QPrinter); if (d->outputFormat == format) return; if (format == QPrinter::NativeFormat) { QPrinterInfo printerToUse = d->findValidPrinter(); if (!printerToUse.isNull()) d->changeEngines(format, printerToUse); } else { d->changeEngines(format, QPrinterInfo()); } }