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>
This commit is contained in:
parent
e96ad10fd8
commit
ab156fcedd
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user