QPrinterInfo

Synopsis

Functions

Static functions

Detailed Description

The PySide.QtGui.QPrinterInfo class gives access to information about existing printers.

Use the static functions to generate a list of PySide.QtGui.QPrinterInfo objects. Each PySide.QtGui.QPrinterInfo object in the list represents a single printer and can be queried for name, supported paper sizes, and whether or not it is the default printer.

class PySide.QtGui.QPrinterInfo
class PySide.QtGui.QPrinterInfo(printer)
class PySide.QtGui.QPrinterInfo(other)
Parameters:

Constructs an empty PySide.QtGui.QPrinterInfo object.

Constructs a PySide.QtGui.QPrinterInfo object from printer .

Constructs a copy of other .

static PySide.QtGui.QPrinterInfo.availablePrinters()
Return type:

Returns a list of available printers on the system.

static PySide.QtGui.QPrinterInfo.defaultPrinter()
Return type:PySide.QtGui.QPrinterInfo

Returns the default printer on the system.

The return value should be checked using PySide.QtGui.QPrinterInfo.isNull() before being used, in case there is no default printer.

PySide.QtGui.QPrinterInfo.isDefault()
Return type:PySide.QtCore.bool

Returns whether this printer is the default printer.

PySide.QtGui.QPrinterInfo.isNull()
Return type:PySide.QtCore.bool

Returns whether this PySide.QtGui.QPrinterInfo object holds a printer definition.

An empty PySide.QtGui.QPrinterInfo object could result for example from calling PySide.QtGui.QPrinterInfo.defaultPrinter() when there are no printers on the system.

PySide.QtGui.QPrinterInfo.printerName()
Return type:unicode

Returns the name of the printer.

PySide.QtGui.QPrinterInfo.supportedPaperSizes()
Return type:

Returns a list of supported paper sizes by the printer.

Not all printer drivers support this query, so the list may be empty. On Mac OS X 10.3, this function always returns an empty list.