QPageSetupDialog Class | Qt Print Support 5.6

Qt 5.6 | Qt Print Support | C++ Classes | QPageSetupDialog

Qt 5.6.2 Reference Documentation

# QPageSetupDialog Class

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

Header: | #include <QPageSetupDialog>
qmake: | QT += printsupport

- List of all members, including inherited members

## Public Functions

| QPageSetupDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR)
| QPageSetupDialog(QWidget *parent = Q_NULLPTR)
| ~QPageSetupDialog()
void | done(int result)
int | exec()
void | open(QObject *receiver, const char *member)
QPrinter * | printer()
void | setVisible(bool visible)

## Detailed Description

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

On Windows and macOS the page setup dialog is implemented using the native page setup dialogs.

Note that on Windows and macOS 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 macOS page setup dialog.

See also QPrinter and QPrintDialog.

## Member Function Documentation

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

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

### QPageSetupDialog::QPageSetupDialog(QWidget *parent = Q_NULLPTR)

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::~QPageSetupDialog()

Destroys the page setup dialog.

### void QPageSetupDialog::done(int result)

### int QPageSetupDialog::exec()

This virtual function is called to pop up the dialog. It must be reimplemented in subclasses.

### void QPageSetupDialog::open(QObject *receiver, const char *member)

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.

### QPrinter *QPageSetupDialog::printer()

Returns the printer that was passed to the QPageSetupDialog constructor.

### void QPageSetupDialog::setVisible(bool visible)