Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete.

This commit is contained in:
Mateusz Skowroński
2021-01-03 10:52:06 +01:00
committed by wwmayer
parent a9945500d8
commit 5b4e76b834
6 changed files with 80 additions and 1 deletions

View File

@@ -516,7 +516,11 @@ void View3DInventor::printPreview()
#if (QT_VERSION > QT_VERSION_CHECK(5, 9, 0))
printer.setPageSize(QPrinter::A4);
#endif
#if QT_VERSION >= 0x050300
printer.setPageOrientation(QPageLayout::Landscape);
#else
printer.setOrientation(QPrinter::Landscape);
#endif
QPrintPreviewDialog dlg(&printer, this);
connect(&dlg, SIGNAL(paintRequested (QPrinter *)),