--- a/eric7/Graphics/SvgDiagram.py Thu Aug 19 17:21:03 2021 +0200 +++ b/eric7/Graphics/SvgDiagram.py Thu Aug 19 18:36:06 2021 +0200 @@ -7,8 +7,8 @@ Module implementing a dialog showing a SVG graphic. """ -from PyQt6.QtCore import Qt, QSize, QEvent -from PyQt6.QtGui import QPalette, QPainter, QFont, QColor, QAction +from PyQt6.QtCore import Qt, QSize, QEvent, QMarginsF +from PyQt6.QtGui import QPalette, QPainter, QFont, QColor, QAction, QPageLayout from PyQt6.QtWidgets import QSizePolicy, QScrollArea, QMenu, QToolBar from PyQt6.QtPrintSupport import QPrinter, QPrintDialog from PyQt6.QtSvgWidgets import QSvgWidget @@ -323,12 +323,12 @@ printer.setPageOrder(QPrinter.PageOrder.FirstPageFirst) else: printer.setPageOrder(QPrinter.PageOrder.LastPageFirst) - printer.setPageMargins( + printer.setPageMargins(QMarginsF( Preferences.getPrinter("LeftMargin") * 10, Preferences.getPrinter("TopMargin") * 10, Preferences.getPrinter("RightMargin") * 10, - Preferences.getPrinter("BottomMargin") * 10, - QPrinter.Unit.Millimeter + Preferences.getPrinter("BottomMargin") * 10), + QPageLayout.Unit.Millimeter ) printerName = Preferences.getPrinter("PrinterName") if printerName: