The QPageSetupDialog class provides a configuration dialog for the page-related options on a printer. 更多...
| 头: | #include <QPageSetupDialog> |
| 继承: | QDialog |
| enum | PageSetupDialogOption { DontUseSheet } |
| flags | PageSetupDialogOptions |
| 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 |
| virtual void | setVisible (bool visible ) |
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.
另请参阅 QPrinter and QPrintDialog .
Used to specify options to the page setup dialog
该值从 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.
This property holds the various options that affect the look and feel of the dialog.
默认情况下,所有选项是被禁用的。
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).
该特性在 Qt 4.5 引入。
访问函数:
| PageSetupDialogOptions | options () const |
| void | setOptions (PageSetupDialogOptions options ) |
另请参阅 setOption () 和 testOption ().
Constructs a page setup dialog that configures printer with parent as the parent widget.
Constructs a page setup dialog that configures a default-constructed QPrinter with parent as the parent widget.
该函数在 Qt 4.5 引入。
另请参阅 printer ().
这是重载函数。
打开对话框并连接其 accepted () 信号到槽,指定通过 receiver and member .
将从槽断开信号连接,当关闭对话框时。
该函数在 Qt 4.5 引入。
Returns the printer that was passed to the QPageSetupDialog 构造函数。
设置给定 option 为被启用若 on 为 true;否则,清零给定 option .
另请参阅 options and testOption ().
[虚拟]
void
QPageSetupDialog::
setVisible
(
bool
visible
)
重实现自 QWidget::setVisible ().
Returns true if the given option 被启用;否则,返回 false。