QPageSetupDialog Class

QPageSetupDialogクラスは、プリンタのページ関連オプションの設定ダイアログを提供します。詳細...

ヘッダー #include <QPageSetupDialog>
CMake: find_package(Qt6 REQUIRED COMPONENTS PrintSupport)
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

詳細説明

WindowsとmacOSでは、ページ設定ダイアログはネイティブのページ設定ダイアログを使用して実装されています。

WindowsとmacOSでは、カスタム用紙サイズはネイティブのページ設定ダイアログに反映されないことに注意してください。さらに、QPrinter で設定したカスタムページの余白は、macOS のネイティブのページ設定ダイアログでは表示されません。

QPrinter およびQPrintDialogも参照してください

メンバー関数ドキュメント

[explicit] QPageSetupDialog::QPageSetupDialog(QWidget *parent = nullptr)

parent を親ウィジェットとしてデフォルトで構築されたQPrinter を設定するページ設定ダイアログを構築します。

printer()も参照してください

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

parent を親ウィジェットとしてprinter を設定するページ設定ダイアログを構築する。

[virtual noexcept] QPageSetupDialog::~QPageSetupDialog()

ページ設定ダイアログを破棄する。

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

再インプリメント:QDialog::done(int r).

[override virtual] int QPageSetupDialog::exec()

再インプリメント:QDialog::exec().

この仮想関数はダイアログをポップアップするために呼び出されます。サブクラスで再実装する必要があります。

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

これはオーバーロードされた関数である。

ダイアログを開き、そのaccepted() シグナルをreceivermember で指定されたスロットに接続します。

ダイアログが閉じられると、シグナルはスロットから切り離されます。

QPrinter *QPageSetupDialog::printer()

QPageSetupDialog コンストラクタに渡されたプリンタを返します。

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

再インプリメント:QDialog::setVisible(bool visible).

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.