QPdfWriter - Fix setting of margins

The setting of margins wasn't being passed to the base class, so calling
margins() wouldn't return the new values.

Change-Id: I86c30f28fb0430f4b9d6e180a59cad354b489289
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
John Layt 2013-12-28 12:02:43 +01:00 committed by The Qt Project
parent c07c9bcf4a
commit d76f05e955

View File

@ -209,6 +209,8 @@ void QPdfWriter::setMargins(const Margins &m)
{
Q_D(QPdfWriter);
QPagedPaintDevice::setMargins(m);
const qreal multiplier = 72./25.4;
d->engine->d_func()->leftMargin = m.left*multiplier;
d->engine->d_func()->rightMargin = m.right*multiplier;