QPageSetupDialog Class Reference

[ QtGui module]

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

继承 QDialog .

类型

方法


详细描述

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.

In Symbian, there is no support for printing. Hence, this dialog should not be used in Symbian.


类型文档编制

QPageSetupDialog.PageSetupDialogOption

Used to specify options to the page setup dialog

This value is obsolete and does nothing since Qt 4.5:

常量 描述
QPageSetupDialog.DontUseSheet 0x00000001 In previous versions of QDialog.exec () the page setup dialog would create a sheet by default if the dialog was given a parent. This is no longer supported from Qt 4.5. If you want to use sheets, use QPageSetupDialog.open () 代替。

该枚举在 Qt 4.4 引入或被修改。

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


方法文档编制

QPageSetupDialog.__init__ ( self , QWidget   parent  = None)

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   printer , QWidget   parent  = None)

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.

该函数在 Qt 4.5 引入。

另请参阅 printer ().

QPageSetupDialog.addEnabledOption ( self , PageSetupDialogOption   option )

PageSetupDialogOptions QPageSetupDialog.enabledOptions ( self )

int QPageSetupDialog.exec_ ( self )

bool QPageSetupDialog.isOptionEnabled ( self , PageSetupDialogOption   option )

QPageSetupDialog.open ( self )

这是重载函数。

打开对话框并连接其 accepted () signal to the slot specified by receiver and member .

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

该函数在 Qt 4.5 引入。

QPageSetupDialog.open ( self , QObject   receiver , SLOT()SLOT()  member )

QPageSetupDialog.open ( self , callable  receiver )

PageSetupDialogOptions QPageSetupDialog.options ( self )

QPrinter QPageSetupDialog.printer ( self )

Returns the printer that was passed to the QPageSetupDialog 构造函数。

QPageSetupDialog.setEnabledOptions ( self , PageSetupDialogOptions   options )

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

设置给定 option to be enabled if on is true; otherwise, clears the given option .

另请参阅 options and testOption ().

QPageSetupDialog.setOptions ( self , PageSetupDialogOptions   options )

QPageSetupDialog.setVisible ( self , bool  visible )

重实现自 QWidget.setVisible ().

bool QPageSetupDialog.testOption ( self , PageSetupDialogOption   option )

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

另请参阅 options and setOption ().