|  | Home · All Classes · Modules

# QPageSetupDialog Class Reference
[QtGui module]

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

Inherits QDialog.

### Types

- enum PageSetupDialogOption { None, DontUseSheet }
- class PageSetupDialogOptions

### Methods

- __init__ (self, QWidget parent = None)
- __init__ (self, QPrinter, QWidget parent = None)
- addEnabledOption (self, PageSetupDialogOption)
- PageSetupDialogOptions enabledOptions (self)
- int exec_ (self)
- bool isOptionEnabled (self, PageSetupDialogOption)
- open (self)
- open (self, QObject, SLOT()SLOT())
- open (self, callable)
- PageSetupDialogOptions options (self)
- QPrinter printer (self)
- setEnabledOptions (self, PageSetupDialogOptions)
- setOption (self, PageSetupDialogOption, bool on = True)
- setOptions (self, PageSetupDialogOptions)
- bool testOption (self, PageSetupDialogOption)

## 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.

## Type Documentation

### QPageSetupDialog.PageSetupDialogOption

Used to specify options to the page setup dialog

This value is obsolete and does nothing since Qt 4.5:

Constant | Value | Description
--- | --- | ---
`QPageSetupDialog.DontUseSheet` | `0x00000001` | In previous versions of Qt, exec_() the page setup dialog would create a sheet by default if the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use QPageSetupDialog.open() instead.

This enum was introduced in Qt 4.4.

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

## Method Documentation

### QPageSetupDialog.__init__ (self, QWidget parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

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

### QPageSetupDialog.__init__ (self, QPrinter, QWidget parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs a page setup dialog that configures a default-constructed QPrinter with parent as the parent widget.

This function was introduced in Qt 4.5.

See also printer().

### QPageSetupDialog.addEnabledOption (self, PageSetupDialogOption)

### PageSetupDialogOptions QPageSetupDialog.enabledOptions (self)

### int QPageSetupDialog.exec_ (self)

### bool QPageSetupDialog.isOptionEnabled (self, PageSetupDialogOption)

### QPageSetupDialog.open (self)

This is an overloaded function.

Opens the dialog and connects its accepted() signal to the slot specified by receiver and member.

The signal will be disconnected from the slot when the dialog is closed.

This function was introduced in Qt 4.5.

### QPageSetupDialog.open (self, QObject, SLOT()SLOT())

### QPageSetupDialog.open (self, callable)

### PageSetupDialogOptions QPageSetupDialog.options (self)

### QPrinter QPageSetupDialog.printer (self)

Returns the printer that was passed to the QPageSetupDialog constructor.

### QPageSetupDialog.setEnabledOptions (self, PageSetupDialogOptions)

### QPageSetupDialog.setOption (self, PageSetupDialogOption, bool on = True)

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options and testOption().

### QPageSetupDialog.setOptions (self, PageSetupDialogOptions)

### bool QPageSetupDialog.testOption (self, PageSetupDialogOption)

Returns true if the given option is enabled; otherwise, returns false.

See also options and setOption().