Printing in Qt is usually achieved using class
QPrinter
.
Since this class is neither a subclass of
QObject
nor a value class suitable for storing into a Qt variant,
the QtLua class QtLuaPrinter
defines a Qt object that
acts as a thin wrapper for class QPrinter
.
Most usual
printer settings
are exposed by class qt.QtLuaPrinter
as properties.
Property printer.paperSize
can be used to specify the size of the drawing in pixels.
Printers can be selected using printer.printerName
and PostScript and PDF files can be produced with
properties printer.outputFileName
and printer.outputFormat
.
Alternatively, function printer:setup()
pops a print dialog
that lets the user adjust these properties interactively.