diff options
author | Andy Shaw <andy.shaw@digia.com> | 2015-04-17 08:04:04 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-05-26 06:48:59 +0000 |
commit | ab156fcedd4c2d2856c0b46699c32926288be292 (patch) | |
tree | 35b636b50f00a8540866e6abf47062becf71a6d9 | |
parent | e96ad10fd8f1d6badfe8ff7befbd397d5cbfe2b4 (diff) |
Use the new non-obsoleted functions for getting the paper details
This fixes a problem with the margins not being correctly respected as the
functions introduced previously would set a different property to what was
being queried in this case.
Change-Id: I3458c8e46239276a296d17aa80da7330c85fcf0a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
-rw-r--r-- | src/printsupport/widgets/qprintpreviewwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp index 208ad5e0f3..7898dc9352 100644 --- a/src/printsupport/widgets/qprintpreviewwidget.cpp +++ b/src/printsupport/widgets/qprintpreviewwidget.cpp @@ -335,8 +335,8 @@ void QPrintPreviewWidgetPrivate::populateScene() pages.clear(); int numPages = pictures.count(); - QSize paperSize = printer->paperRect().size(); - QRect pageRect = printer->pageRect(); + QSize paperSize = printer->pageLayout().fullRectPixels(printer->resolution()).size(); + QRect pageRect = printer->pageLayout().paintRectPixels(printer->resolution()); for (int i = 0; i < numPages; i++) { PageItem* item = new PageItem(i+1, pictures.at(i), paperSize, pageRect); |