Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete.
This commit is contained in:
committed by
wwmayer
parent
2b60042821
commit
9ee06a098a
@@ -513,12 +513,11 @@ void View3DInventor::printPreview()
|
||||
{
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setFullPage(true);
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(5, 9, 0))
|
||||
printer.setPageSize(QPrinter::A4);
|
||||
#endif
|
||||
#if QT_VERSION >= 0x050300
|
||||
printer.setPageSize(QPageSize(QPageSize::A4));
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
#else
|
||||
printer.setPageSize(QPrinter::A4);
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user