You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from sgtk.platform.qt5 import QtPrintSupport
QPrinter = QtPrintSupport.QPrinter
# Set up the printer
printer = QPrinter(QPrinter.HighResolution)
printer.setPaperSize(QPrinter.A4)
printer.setResolution(300)
# Note: this will set the format to PdfFormat.
printer.setOutputFileName(tempfile.gettempdir() + "foo.pdf")
# Use the system implementation rather than the one coming with Qt.
printer.setOutputFormat(QPrinter.NativeFormat)
painter = QtGui.QPainter()
painter.begin(printer)
# Some code to paint things here.
painter.end()
It throws the following error: QMacCGContext:: Unsupported paint device type 4
It doesn't seem to impact the output, the document works fine.
I have another setup where this is run from another app that belongs to a framework, and the error is not thrown, and I can't find the difference between the two setups.
When running this code from a shell on MacOS:
It throws the following error:
QMacCGContext:: Unsupported paint device type 4
It doesn't seem to impact the output, the document works fine.
I have another setup where this is run from another app that belongs to a framework, and the error is not thrown, and I can't find the difference between the two setups.
I tried digging through the C++ code but could not find why this was thrown, although I found where:
https://code.woboq.org/qt5/qtbase/src/gui/painting/qcoregraphics.mm.html#393
The text was updated successfully, but these errors were encountered: