このページでは

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)

デフォルトで生成されたQPrinter を、親ウィジェットとしてparent を持つように設定するページ設定ダイアログを作成します。

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()シグナルを、receiver およびmember で指定されたスロットに接続します。

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

QPrinter *QPageSetupDialog::printer()

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

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

QDialog::setVisible (bool visible)を再実装します。

© 2026 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.