|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QPageSetupDialog Class Reference
[QtGui module]

The QPageSetupDialog class provides a configuration dialog for the page-related options on a printer. More...

     #include <QPageSetupDialog>

Inherits QDialog.

- List of all members, including inherited members

### Public Types

- enum PageSetupDialogOption { None, DontUseSheet }
- flags PageSetupDialogOptions

### Public Functions

- QPageSetupDialog ( QPrinter * printer, QWidget * parent = 0 )
- void addEnabledOption ( PageSetupDialogOption option )
- PageSetupDialogOptions enabledOptions () const
- bool isOptionEnabled ( PageSetupDialogOption option ) const
- QPrinter * printer ()
- void setEnabledOptions ( PageSetupDialogOptions options )

- 5 public functions inherited from QDialog
- 206 public functions inherited from QWidget
- 29 public functions inherited from QObject
- 12 public functions inherited from QPaintDevice

### Additional Inherited Members

- 2 properties inherited from QDialog
- 57 properties inherited from QWidget
- 1 property inherited from QObject
- 4 public slots inherited from QDialog
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 3 signals inherited from QDialog
- 1 signal inherited from QWidget
- 1 signal inherited from QObject
- 4 static public members inherited from QWidget
- 5 static public members inherited from QObject
- 38 protected functions inherited from QWidget
- 7 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget

## Detailed Description

The QPageSetupDialog class provides a configuration dialog for the page-related options on a printer.

On Windows and Mac OS X the page setup dialog is implemented using the native page setup dialogs.

Note that on Windows and Mac OS X custom paper sizes won't be reflected in the native page setup dialogs. Additionally, custom page margins set on a QPrinter won't show in the native Mac OS X page setup dialog.

See also QPrinter and QPrintDialog.

## Member Type Documentation

### enum QPageSetupDialog::PageSetupDialogOption
flags QPageSetupDialog::PageSetupDialogOptions

Used to specify options to the page setup dialog

Constant | Value | Description
--- | --- | ---
`QPageSetupDialog::None` | `0x0000` | None of the options are enabled.

`QPageSetupDialog::DontUseSheet`

`0x0001`

Do not make the native print dialog a sheet. By default on Mac OS X, the native dialog is made a sheet if it has a parent that can accept sheets and is visible. Internally, Mac OS X tracks whether a printing <em>session</em> and not which particular dialog should have a sheet or not. Therefore, make sure this value matches between the page setup dialog and the print dialog or you can potentially end up in a modal loop that you can't break.

The PageSetupDialogOptions type is a typedef for QFlags<PageSetupDialogOption>. It stores an OR combination of PageSetupDialogOption values.

## Member Function Documentation

### QPageSetupDialog::QPageSetupDialog ( QPrinter * printer, QWidget * parent = 0 )

Constructs a page setup dialog that configures printer with parent as the parent widget.

### void QPageSetupDialog::addEnabledOption ( PageSetupDialogOption option )

Adds the option option to the set of enabled options in this dialog.

### PageSetupDialogOptions QPageSetupDialog::enabledOptions () const

Returns the set of enabled options in this dialog.

See also setEnabledOptions().

### bool QPageSetupDialog::isOptionEnabled ( PageSetupDialogOption option ) const

Returns true if the specified option is enabled; otherwise returns false

### QPrinter * QPageSetupDialog::printer ()

Returns the printer that was passed to the QPageSetupDialog constructor.

### void QPageSetupDialog::setEnabledOptions ( PageSetupDialogOptions options )

Sets the set of options that should be enabled for the page setup dialog to options.

See also enabledOptions().