|  | Home · All Classes · Modules

# QPrinterInfo Class Reference
[QtGui module]

The QPrinterInfo class gives access to information about existing printers. More...

### Methods

- __init__ (self)
- __init__ (self, QPrinterInfo)
- __init__ (self, QPrinter)
- bool isDefault (self)
- bool isNull (self)
- QString printerName (self)
- list-of-QPrinter.PageSize supportedPaperSizes (self)

### Static Methods

- list-of-QPrinterInfo availablePrinters ()
- QPrinterInfo defaultPrinter ()

## Detailed Description

The QPrinterInfo class gives access to information about existing printers.

Use the static functions to generate a list of QPrinterInfo objects. Each 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.

## Method Documentation

### QPrinterInfo.__init__ (self)

Constructs an empty QPrinterInfo object.

See also isNull().

### QPrinterInfo.__init__ (self, QPrinterInfo)

Constructs a copy of src.

### QPrinterInfo.__init__ (self, QPrinter)

Constructs a QPrinterInfo object from printer.

### list-of-QPrinterInfo QPrinterInfo.availablePrinters ()

Returns a list of available printers on the system.

### QPrinterInfo QPrinterInfo.defaultPrinter ()

Returns the default printer on the system.

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

See also isNull().

### bool QPrinterInfo.isDefault (self)

Returns whether this printer is the default printer.

### bool QPrinterInfo.isNull (self)

Returns whether this QPrinterInfo object holds a printer definition.

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

### QString QPrinterInfo.printerName (self)

Returns the name of the printer.

See also QPrinter.setPrinterName().

### list-of-QPrinter.PageSize QPrinterInfo.supportedPaperSizes (self)

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.

This function was introduced in Qt 4.4.