![]() QPrinter:: QPrinter( QPrinter::PrinterMode mode = ScreenResolution)Ĭreates a new printer object with the given mode. Member Function Documentation QPrinter:: QPrinter(const QPrinterInfo & printer, QPrinter::PrinterMode mode = ScreenResolution)Ĭreates a new printer object with the given printer and mode. See also QPrintDialog and Qt Print Support. Since QPrinter can print to any QPrintEngine subclass, it is possible to extend printing support to cover new types of printing subsystem by subclassing QPrintEngine and reimplementing its interface. It may cancel the entire job or just part of it. If you want to abort the print job, abort() will try its best to stop printing. Similarly, calling newPage() after the last page in a document is painted will result in a trailing blank page appended to the end of the printed document. You only need to calling newPage() after QPainter::begin() if you need to insert a blank page at the beginning of a printed document. The first page in a document does not need to be preceded by a call to newPage(). The second page and all following pages are prepared using a call to newPage() before they are painted. Once the first page has been painted, newPage() can be called to request a new blank page to paint on, or QPainter::end() can be called to finish printing. When QPainter::begin() is called, the QPrinter it operates on is prepared for a new page, enabling the QPainter to be used immediately to paint the first page in a document. See QAbstractPrintDialog's documentation for more details. There are also some settings that the user sets (through the printer dialog) and that applications are expected to obey. This usually makes sense because, for example, it's not possible to change the number of copies when you are halfway through printing. Many of these functions can only be called before the actual printing begins (i.e., before QPainter::begin() is called). setCop圜ount() tells QPrinter how many copies of the document it should print.setFullPage() tells QPrinter whether you want to deal with the full page or just with the part the printer can draw on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |