According to documentation "The origin of the QPainter's coordinate system will

coincide with the top-left corner of the page rectangle, and painting operations
will be clipped to the bounds of the drawable part of the page".

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-06-02 21:00:23 +03:00
parent 342095408a
commit c36f19aba9

View File

@ -341,9 +341,6 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer)
copyCount = printer->copyCount(); copyCount = printer->copyCount();
} }
qreal left, top, right, bottom;
printer->getPageMargins(&left, &top, &right, &bottom, QPrinter::Millimeter);
for (int i = 0; i < copyCount; ++i) for (int i = 0; i < copyCount; ++i)
{ {
for (int j = 0; j < numPages; ++j) for (int j = 0; j < numPages; ++j)
@ -365,7 +362,7 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer)
{ {
index = lastPage - j; index = lastPage - j;
} }
painter.drawImage(QPointF(left, top), poster.at(index)); painter.drawImage(QPointF(), poster.at(index));
} }
} }