diff --git a/qwt/plot_renderer.py b/qwt/plot_renderer.py index 8954295..112c9de 100644 --- a/qwt/plot_renderer.py +++ b/qwt/plot_renderer.py @@ -249,7 +249,11 @@ def renderDocument( printer.setPrinterName("") else: printer.setOutputFormat(QPrinter.PostScriptFormat) - printer.setColorMode(QPrinter.Color) + try: + printer.setColorMode(QPrinter.Color) + except AttributeError: + # PyQt6 on Linux + pass printer.setFullPage(True) printer.setPageSize(QPageSize(sizeMM, QPageSize.Millimeter)) printer.setDocName(title)