Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
4.8.3
-
None
-
Windows 7, Mac OS
Description
QPrinter::pageRect() returns different value before QPrinterDialog is shown to what it is after the printing. Setting the paper size before this makes no difference.
The issue can be reproduced with the textedit demo by adding the following debug prints and paper size setting to TextEdit::filePrint() method
QPrinter printer(QPrinter::HighResolution); printer.setPaperSize(QPrinter::A4); qDebug() << printer.pageRect(QPrinter::Millimeter); QPrintDialog *dlg = new QPrintDialog(&printer, this); if (textEdit->textCursor().hasSelection()) dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection); dlg->setWindowTitle(tr("Print Document")); if (dlg->exec() == QDialog::Accepted) { textEdit->print(&printer); } delete dlg; qDebug() << printer.pageRect(QPrinter::Millimeter);
Attachments
Issue Links
- is required for
-
QTBUG-25380 QtPrintSupport - Page Layout Issues
- Open
-
QTBUG-37698 QtPrintSupport - Dialog Issues
- Open