QPageSetupDialog Class

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

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

Public Functions

QPageSetupDialog(QPrinter *printer, QWidget *parent = nullptr)
QPageSetupDialog(QWidget *parent = nullptr)
virtual ~QPageSetupDialog()
void open(QObject *receiver, const char *member)
QPrinter *printer()

Reimplemented Public Functions

virtual void done(int result) override
virtual int exec() override
  • 11 public functions inherited from QDialog
  • 225 public functions inherited from QWidget
  • 34 public functions inherited from QObject
  • 14 public functions inherited from QPaintDevice

Additional Inherited Members

  • 2 properties inherited from QDialog
  • 59 properties inherited from QWidget
  • 1 property inherited from QObject
  • 5 public slots inherited from QDialog
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject
  • 3 signals inherited from QDialog
  • 4 signals inherited from QWidget
  • 2 signals inherited from QObject
  • 1 public variable inherited from QDialog
  • 1 public variable inherited from QWidget
  • 1 public variable inherited from QObject
  • 2 static public members inherited from QDialog
  • 7 static public members inherited from QWidget
  • 10 static public members inherited from QObject
  • 6 protected functions inherited from QDialog
  • 35 protected functions inherited from QWidget
  • 9 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice
  • 1 protected slot inherited from QWidget
  • 2 protected variables inherited from QObject
  • 1 protected type inherited from QPaintDevice

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 = nullptr)

Default constructs an instance of QPageSetupDialog.

QPageSetupDialog::QPageSetupDialog(QWidget *parent = nullptr)

Default constructs an instance of QPageSetupDialog.

[virtual] QPageSetupDialog::~QPageSetupDialog()

Destroys the instance of QPageSetupDialog. The destructor is virtual.

[override virtual] void QPageSetupDialog::done(int result)

Reimplemented from QDialog::done().

[override virtual] int QPageSetupDialog::exec()

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()