<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qpagesetupdialog.cpp --> <title>QPageSetupDialog Class | Qt Print Support 5.12.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtprintsupport-index.html">Qt Print Support</a></td><td ><a href="qtprintsupport-module.html">C++ Classes</a></td><td >QPageSetupDialog</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtprintsupport-index.html">Qt 5.12.6 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li> <li class="level1"><a href="#static-public-members">Static Public Members</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QPageSetupDialog Class</h1> <!-- $$$QPageSetupDialog-brief --> <p>The <a href="qpagesetupdialog.html">QPageSetupDialog</a> class provides a configuration dialog for the page-related options on a printer. <a href="#details">More...</a></p> <!-- @@@QPageSetupDialog --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QPageSetupDialog></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += printsupport</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtwidgets/qdialog.html">QDialog</a></td></tr></table></div><ul> <li><a href="qpagesetupdialog-members.html">List of all members, including inherited members</a></li> <li><a href="qpagesetupdialog-obsolete.html">Obsolete members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#QPageSetupDialog">QPageSetupDialog</a></b>(QPrinter *<i>printer</i>, QWidget *<i>parent</i> = nullptr)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#QPageSetupDialog-1">QPageSetupDialog</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#dtor.QPageSetupDialog">~QPageSetupDialog</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#open">open</a></b>(QObject *<i>receiver</i>, const char *<i>member</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPrinter *</td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#printer">printer</a></b>()</td></tr> </table></div> <a name="reimplemented-public-functions"></a> <h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#done">done</a></b>(int <i>result</i>) override</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#exec">exec</a></b>() override</td></tr> </table></div> <ul> <li class="fn">8 public functions inherited from <a href="../qtwidgets/qdialog.html#public-functions">QDialog</a></li> <li class="fn">216 public functions inherited from <a href="../qtwidgets/qwidget.html#public-functions">QWidget</a></li> <li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li> <li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li> </ul> <a name="static-public-members"></a> <h2 id="static-public-members">Static Public Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qpagesetupdialog.html#staticMetaObject-var">staticMetaObject</a></b></td></tr> </table></div> <ul> <li class="fn">5 static public members inherited from <a href="../qtwidgets/qwidget.html#static-public-members">QWidget</a></li> <li class="fn">9 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">2 properties inherited from <a href="../qtwidgets/qdialog.html#properties">QDialog</a></li> <li class="fn">59 properties inherited from <a href="../qtwidgets/qwidget.html#properties">QWidget</a></li> <li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li> <li class="fn">5 public slots inherited from <a href="../qtwidgets/qdialog.html#public-slots">QDialog</a></li> <li class="fn">19 public slots inherited from <a href="../qtwidgets/qwidget.html#public-slots">QWidget</a></li> <li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li> <li class="fn">3 signals inherited from <a href="../qtwidgets/qdialog.html#signals">QDialog</a></li> <li class="fn">3 signals inherited from <a href="../qtwidgets/qwidget.html#signals">QWidget</a></li> <li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li> <li class="fn">6 protected functions inherited from <a href="../qtwidgets/qdialog.html#protected-functions">QDialog</a></li> <li class="fn">35 protected functions inherited from <a href="../qtwidgets/qwidget.html#protected-functions">QWidget</a></li> <li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li> <li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li> <li class="fn">1 protected slot inherited from <a href="../qtwidgets/qwidget.html#protected-slots">QWidget</a></li> </ul> <a name="details"></a> <!-- $$$QPageSetupDialog-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qpagesetupdialog.html">QPageSetupDialog</a> class provides a configuration dialog for the page-related options on a printer.</p> <p>On Windows and macOS the page setup dialog is implemented using the native page setup dialogs.</p> <p>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 <a href="qprinter.html">QPrinter</a> won't show in the native macOS page setup dialog.</p> </div> <p><b>See also </b><a href="qprinter.html">QPrinter</a> and <a href="qprintdialog.html">QPrintDialog</a>.</p> <!-- @@@QPageSetupDialog --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QPageSetupDialog[overload1]$$$QPageSetupDialogQPrinter*QWidget* --> <h3 class="fn" id="QPageSetupDialog"><a name="QPageSetupDialog"></a>QPageSetupDialog::<span class="name">QPageSetupDialog</span>(<span class="type"><a href="qprinter.html">QPrinter</a></span> *<i>printer</i>, <span class="type"><a href="../qtwidgets/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3> <p>Constructs a page setup dialog that configures <i>printer</i> with <i>parent</i> as the parent widget.</p> <!-- @@@QPageSetupDialog --> <!-- $$$QPageSetupDialog$$$QPageSetupDialogQWidget* --> <h3 class="fn" id="QPageSetupDialog-1"><a name="QPageSetupDialog-1"></a>QPageSetupDialog::<span class="name">QPageSetupDialog</span>(<span class="type"><a href="../qtwidgets/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3> <p>Constructs a page setup dialog that configures a default-constructed <a href="qprinter.html">QPrinter</a> with <i>parent</i> as the parent widget.</p> <p>This function was introduced in Qt 4.5.</p> <p><b>See also </b><a href="qpagesetupdialog.html#printer">printer</a>().</p> <!-- @@@QPageSetupDialog --> <!-- $$$~QPageSetupDialog[overload1]$$$~QPageSetupDialog --> <h3 class="fn" id="dtor.QPageSetupDialog"><a name="dtor.QPageSetupDialog"></a><code>[virtual] </code>QPageSetupDialog::<span class="name">~QPageSetupDialog</span>()</h3> <p>Destroys the page setup dialog.</p> <!-- @@@~QPageSetupDialog --> <!-- $$$done[overload1]$$$doneint --> <h3 class="fn" id="done"><a name="done"></a><code>[override virtual] </code><span class="type">void</span> QPageSetupDialog::<span class="name">done</span>(<span class="type">int</span> <i>result</i>)</h3> <p>Reimplemented from <a href="../qtwidgets/qdialog.html#done">QDialog::done</a>().</p> <!-- @@@done --> <!-- $$$exec[overload1]$$$exec --> <h3 class="fn" id="exec"><a name="exec"></a><code>[override virtual] </code><span class="type">int</span> QPageSetupDialog::<span class="name">exec</span>()</h3> <p>Reimplemented from <a href="../qtwidgets/qdialog.html#exec">QDialog::exec</a>().</p> <p>This virtual function is called to pop up the dialog. It must be reimplemented in subclasses.</p> <!-- @@@exec --> <!-- $$$open[overload1]$$$openQObject*constchar* --> <h3 class="fn" id="open"><a name="open"></a><span class="type">void</span> QPageSetupDialog::<span class="name">open</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>receiver</i>, const <span class="type">char</span> *<i>member</i>)</h3> <p>This is an overloaded function.</p> <p>Opens the dialog and connects its <a href="../qtwidgets/qdialog.html#accepted">accepted</a>() signal to the slot specified by <i>receiver</i> and <i>member</i>.</p> <p>The signal will be disconnected from the slot when the dialog is closed.</p> <p>This function was introduced in Qt 4.5.</p> <!-- @@@open --> <!-- $$$printer[overload1]$$$printer --> <h3 class="fn" id="printer"><a name="printer"></a><span class="type"><a href="qprinter.html">QPrinter</a></span> *QPageSetupDialog::<span class="name">printer</span>()</h3> <p>Returns the printer that was passed to the <a href="qpagesetupdialog.html">QPageSetupDialog</a> constructor.</p> <!-- @@@printer --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> 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. </p> </div> </body> </html>