Home · All Classes · All Functions · Overviews

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.


Public Types

enum PageSetupDialogOption { DontUseSheet }
flags PageSetupDialogOptions

Properties


Public Functions

QPageSetupDialog ( QPrinter * printer, QWidget * parent = 0 )
QPageSetupDialog ( QWidget * parent = 0 )
void open ( QObject * receiver, const char * member )
PageSetupDialogOptions options () const
QPrinter * printer ()
void setOption ( PageSetupDialogOption option, bool on = true )
void setOptions ( PageSetupDialogOptions options )
bool testOption ( PageSetupDialogOption option ) const

Reimplemented Public Functions

virtual void setVisible ( bool visible )

Additional Inherited Members


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

This value is obsolete and does nothing since Qt 4.5:

ConstantValueDescription
QPageSetupDialog::DontUseSheet0x00000001In 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.


Property Documentation

options : PageSetupDialogOptions

This property holds the various options that affect the look and feel of the dialog.

By default, all options are disabled.

Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).

This property was introduced in Qt 4.5.

Access functions:

PageSetupDialogOptions options () const
void setOptions ( PageSetupDialogOptions options )

See also setOption() and testOption().


Member Function Documentation

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

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

QPageSetupDialog::QPageSetupDialog ( QWidget * parent = 0 )

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

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::setOption ( PageSetupDialogOption option, bool on = true )

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

See also options and testOption().

void QPageSetupDialog::setVisible ( bool visible )   [virtual]

Reimplemented from QWidget::setVisible().

bool QPageSetupDialog::testOption ( PageSetupDialogOption option ) const

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

See also options and setOption().


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.3