Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.7.4
-
None
Description
If custom page size is selected for the printer, QPrinter::pageRect ignores page orientation and always return rect for portrait printing.
qprintengine_win.cpp,
QVariant QWin32PrintEngine::property(PrintEnginePropertyKey key) const
take a look to the specified fragement:
case PPK_PageRect: if (d->has_custom_paper_size) { QRect rect(0, 0, qRound(d->paper_size.width() * d->resolution / 72.0), qRound(d->paper_size.height() * d->resolution / 72.0)); if (d->pageMarginsSet) { rect = rect.adjusted(qRound(mmToInches(d->previousDialogMargins.left()/100.0) * d->resolution), qRound(mmToInches(d->previousDialogMargins.top()/100.0) * d->resolution), -qRound(mmToInches(d->previousDialogMargins.width()/100.0) * d->resolution), -qRound(mmToInches(d->previousDialogMargins.height()/100.0) * d->resolution)); } value = rect; } else {
It looks like there is no code for applying orientation at all.
Attachments
Issue Links
- is required for
-
QTBUG-25380 QtPrintSupport - Page Layout Issues
- Open
-
QTBUG-25384 QtPrintSupport - Windows issues
- Open