QPageSetupDialog 类

QPageSetupDialog 类提供用于打印机页面相关选项的配置对话框。 更多...

头: #include <QPageSetupDialog>
CMake: find_package(Qt6 COMPONENTS PrintSupport REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::PrintSupport)
qmake: QT += printsupport
继承: QDialog

公共函数

  QPageSetupDialog (QWidget * parent = nullptr)
  QPageSetupDialog (QPrinter * printer , QWidget * parent = nullptr)
virtual ~QPageSetupDialog ()
void open (QObject * receiver , const char * member )
QPrinter * printer ()

重实现公共函数

virtual void done (int result ) override
virtual int exec () override
virtual void setVisible (bool visible ) override

详细描述

On Windows and macOS the page setup dialog is implemented using the native page setup dialogs.

Note that on Windows and macOS 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 macOS page setup dialog.

另请参阅 QPrinter and QPrintDialog .

成员函数文档编制

QPageSetupDialog:: QPageSetupDialog ( QWidget * parent = nullptr)

Constructs a page setup dialog that configures a default-constructed QPrinter with parent as the parent widget.

另请参阅 printer ().

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

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

[虚拟] QPageSetupDialog:: ~QPageSetupDialog ()

Destroys the page setup dialog.

[override virtual] void QPageSetupDialog:: done ( int result )

重实现: QDialog::done (int r).

[override virtual] int QPageSetupDialog:: exec ()

重实现: QDialog::exec ().

This virtual function is called to pop up the dialog. It must be reimplemented in subclasses.

void QPageSetupDialog:: open ( QObject * receiver , const char * member )

这是重载函数。

打开对话框并连接其 accepted () 信号到槽,指定通过 receiver and member .

将从槽断开信号连接,当关闭对话框时。

QPrinter *QPageSetupDialog:: printer ()

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

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

重实现: QDialog::setVisible (bool visible).