QAbstractPrintDialog Class

The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure printers. More...

Header: #include <QAbstractPrintDialog>
qmake: QT += printsupport
Inherits: QDialog
Inherited By:

QPrintDialog

Public Types

enum PrintDialogOption { None, PrintToFile, PrintSelection, PrintPageRange, PrintShowPageSize, …, DontUseSheet }
enum PrintRange { AllPages, Selection, PageRange, CurrentPage }

Detailed Description

This class implements getter and setter functions that are used to customize settings shown in print dialogs, but it is not used directly. Use QPrintDialog to display a print dialog in your application.

See also QPrintDialog and QPrinter.

Member Type Documentation

enum QAbstractPrintDialog::PrintDialogOption

Used to specify which parts of the print dialog should be visible.

ConstantValueDescription
QAbstractPrintDialog::None0x0000None of the options are enabled.
QAbstractPrintDialog::PrintToFile0x0001The print to file option is enabled.
QAbstractPrintDialog::PrintSelection0x0002The print selection option is enabled.
QAbstractPrintDialog::PrintPageRange0x0004The page range selection option is enabled.
QAbstractPrintDialog::PrintShowPageSize0x0008Show the page size + margins page only if this is enabled.
QAbstractPrintDialog::PrintCollateCopies0x0010The collate copies option is enabled
QAbstractPrintDialog::PrintCurrentPage0x0040The print current page option is enabled

This value is obsolete and does nothing since Qt 4.5:

ConstantValueDescription
QAbstractPrintDialog::DontUseSheet0x0020In previous versions of Qt, exec() the print dialog would create a sheet by default the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use QPrintDialog::open() instead.

enum QAbstractPrintDialog::PrintRange

Used to specify the print range selection option.

ConstantValueDescription
QAbstractPrintDialog::AllPages0All pages should be printed.
QAbstractPrintDialog::Selection1Only the selection should be printed.
QAbstractPrintDialog::PageRange2The specified page range should be printed.
QAbstractPrintDialog::CurrentPage3Only the currently visible page should be printed.

See also QPrinter::PrintRange.