May 2019
Intermediate to advanced
542 pages
13h 37m
English
Printing begins with a QtPrintSupport.QPrinter object, which represents a printed document in memory. The basic workflow of printing in PyQt is as follows:
In MainWindow.__init__(), let's create our QPrinter object, as follows:
self.printer = qtps.QPrinter() self.printer.setOrientation(qtps.QPrinter.Portrait) self.printer.setPageSize(qtg.QPageSize(qtg.QPageSize.Letter))
Once the printer is created, we can configure a wide number of properties; here, ...
Read now
Unlock full access