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。