The warning is accessible only if build with Qt 5.3. ref #570.
--HG-- branch : develop
This commit is contained in:
parent
27767e46e2
commit
8d455952f8
|
@ -964,12 +964,16 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer, const PrintType &pr
|
|||
const qreal top = FromPixel(margins.top(), Unit::Mm);
|
||||
const qreal right = FromPixel(margins.right(), Unit::Mm);
|
||||
const qreal bottom = FromPixel(margins.bottom(), Unit::Mm);
|
||||
const bool success = printer->setPageMargins(left, top, right, bottom, QPrinter::Millimeter);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
|
||||
const bool success = printer->setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter);
|
||||
|
||||
if (not success)
|
||||
{
|
||||
qWarning() << tr("Cannot set printer margins");
|
||||
}
|
||||
#else
|
||||
printer->setPageMargins(left, top, right, bottom, QPrinter::Millimeter);
|
||||
#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
|
||||
|
||||
switch(printType)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user