|  | Home · Overviews · Examples |

# QPrintDialog Class Reference
[com.trolltech.qt.gui module]

The `QPrintDialog` class provides a dialog for specifying the printer's configuration. More...

Inherits `QAbstractPrintDialog`.

## Detailed Description

The `QPrintDialog` class provides a dialog for specifying the printer's configuration.

The dialog allows users to change document-related settings, such as the paper size and orientation, type of print (color or grayscale), range of pages, and number of copies to print.

Controls are also provided to enable users to choose from the printers available, including any configured network printers.

Typically, `QPrintDialog` objects are constructed with a `QPrinter` object, and executed using the `exec` function.

        QPrintDialog printDialog(printer, parent);
        if (printDialog.exec() == QDialog::Accepted) {
            // print ...
        }

If the dialog is accepted by the user, the `QPrinter` object is correctly configured for printing.

The printer dialog (shown above in Plastique style) enables access to common printing properties. On X11 platforms that use the CUPS printing system, the settings for each available printer can be modified via the dialog's Properties push button.

On Windows and Mac OS X, the native print dialog is used, which means that some `QWidget` and `QDialog` properties set on the dialog won't be respected. In addition, the native print dialog on Mac OS X does not support setting printer options, i.e. QAbstractPrintDialog::setEnabledOptions() and QAbstractPrintDialog::addEnabledOption() have no effect.

See also `QPageSetupDialog`, `QPrinter`, Pixelator Example, Order Form Example, Image Viewer Example, and Scribble Example.