Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > d5e62c01ae8d1e579463c6a871dd44bf > files > 5227

qtbase5-doc-5.12.6-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwizard.cpp -->
  <title>QWizard Class | Qt Widgets 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="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QWizard</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtwidgets-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-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<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="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#a-trivial-example">A Trivial Example</a></li>
<li class="level2"><a href="#wizard-look-and-feel">Wizard Look and Feel</a></li>
<li class="level2"><a href="#elements-of-a-wizard-page">Elements of a Wizard Page</a></li>
<li class="level2"><a href="#registering-and-using-fields">Registering and Using Fields</a></li>
<li class="level2"><a href="#creating-linear-wizards">Creating Linear Wizards</a></li>
<li class="level2"><a href="#creating-non-linear-wizards">Creating Non-Linear Wizards</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QWizard Class</h1>
<!-- $$$QWizard-brief -->
<p>The <a href="qwizard.html">QWizard</a> class provides a framework for wizards. <a href="#details">More...</a></p>
<!-- @@@QWizard -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QWizard&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.3</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qdialog.html">QDialog</a></td></tr></table></div><ul>
<li><a href="qwizard-members.html">List of all members, including inherited members</a></li>
<li><a href="qwizard-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#WizardButton-enum">WizardButton</a></b> { BackButton, NextButton, CommitButton, FinishButton, ..., Stretch }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#WizardOption-enum">WizardOption</a></b> { IndependentPages, IgnoreSubTitles, ExtendedWatermarkPixmap, NoDefaultButton, ..., NoCancelButtonOnLastPage }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#WizardOption-enum">WizardOptions</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#WizardPixmap-enum">WizardPixmap</a></b> { WatermarkPixmap, LogoPixmap, BannerPixmap, BackgroundPixmap }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#WizardStyle-enum">WizardStyle</a></b> { ClassicStyle, ModernStyle, MacStyle, AeroStyle }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qwizard.html#currentId-prop">currentId</a></b> : const int</li>
<li class="fn"><b><a href="qwizard.html#options-prop">options</a></b> : WizardOptions</li>
<li class="fn"><b><a href="qwizard.html#startId-prop">startId</a></b> : int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qwizard.html#subTitleFormat-prop">subTitleFormat</a></b> : Qt::TextFormat</li>
<li class="fn"><b><a href="qwizard.html#titleFormat-prop">titleFormat</a></b> : Qt::TextFormat</li>
<li class="fn"><b><a href="qwizard.html#wizardStyle-prop">wizardStyle</a></b> : WizardStyle</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">2 properties inherited from <a href="qdialog.html#properties">QDialog</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</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="qwizard.html#QWizard">QWizard</a></b>(QWidget *<i>parent</i> = nullptr, Qt::WindowFlags <i>flags</i> = ...)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#dtor.QWizard">~QWizard</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#addPage">addPage</a></b>(QWizardPage *<i>page</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractButton *</td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#button">button</a></b>(QWizard::WizardButton <i>which</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#buttonText">buttonText</a></b>(QWizard::WizardButton <i>which</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#currentId-prop">currentId</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWizardPage *</td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#currentPage">currentPage</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#field">field</a></b>(const QString &amp;<i>name</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#hasVisitedPage">hasVisitedPage</a></b>(int <i>id</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#nextId">nextId</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWizard::WizardOptions </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#options-prop">options</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWizardPage *</td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#page">page</a></b>(int <i>id</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;int&gt; </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#pageIds">pageIds</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#pixmap">pixmap</a></b>(QWizard::WizardPixmap <i>which</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#removePage">removePage</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setButton">setButton</a></b>(QWizard::WizardButton <i>which</i>, QAbstractButton *<i>button</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setButtonLayout">setButtonLayout</a></b>(const QList&lt;QWizard::WizardButton&gt; &amp;<i>layout</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setButtonText">setButtonText</a></b>(QWizard::WizardButton <i>which</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setDefaultProperty">setDefaultProperty</a></b>(const char *<i>className</i>, const char *<i>property</i>, const char *<i>changedSignal</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setField">setField</a></b>(const QString &amp;<i>name</i>, const QVariant &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setOption">setOption</a></b>(QWizard::WizardOption <i>option</i>, bool <i>on</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#options-prop">setOptions</a></b>(QWizard::WizardOptions <i>options</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setPage">setPage</a></b>(int <i>id</i>, QWizardPage *<i>page</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setPixmap">setPixmap</a></b>(QWizard::WizardPixmap <i>which</i>, const QPixmap &amp;<i>pixmap</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#setSideWidget">setSideWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#startId-prop">setStartId</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#subTitleFormat-prop">setSubTitleFormat</a></b>(Qt::TextFormat <i>format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#titleFormat-prop">setTitleFormat</a></b>(Qt::TextFormat <i>format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#wizardStyle-prop">setWizardStyle</a></b>(QWizard::WizardStyle <i>style</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#sideWidget">sideWidget</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#startId-prop">startId</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#subTitleFormat-prop">subTitleFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#testOption">testOption</a></b>(QWizard::WizardOption <i>option</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#titleFormat-prop">titleFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#validateCurrentPage">validateCurrentPage</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;int&gt; </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#visitedPages">visitedPages</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWizard::WizardStyle </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#wizardStyle-prop">wizardStyle</a></b>() const</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="qwizard.html#setVisible">setVisible</a></b>(bool <i>visible</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#sizeHint">sizeHint</a></b>() const override</td></tr>
</table></div>
<ul>
<li class="fn">8 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
<li class="fn">214 public functions inherited from <a href="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="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#back">back</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#next">next</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#restart">restart</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">5 public slots inherited from <a href="qdialog.html#public-slots">QDialog</a></li>
<li class="fn">19 public slots inherited from <a href="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>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#currentIdChanged">currentIdChanged</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#customButtonClicked">customButtonClicked</a></b>(int <i>which</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#helpRequested">helpRequested</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#pageAdded">pageAdded</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#pageRemoved">pageRemoved</a></b>(int <i>id</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 signals inherited from <a href="qdialog.html#signals">QDialog</a></li>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</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="qwizard.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">5 static public members inherited from <a href="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>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#cleanupPage">cleanupPage</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#initializePage">initializePage</a></b>(int <i>id</i>)</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#done">done</a></b>(int <i>result</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#event">event</a></b>(QEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#nativeEvent">nativeEvent</a></b>(const QByteArray &amp;<i>eventType</i>, void *<i>message</i>, long *<i>result</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#resizeEvent">resizeEvent</a></b>(QResizeEvent *<i>event</i>) override</td></tr>
</table></div>
<ul>
<li class="fn">6 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">35 protected functions inherited from <a href="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>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QWizard-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qwizard.html">QWizard</a> class provides a framework for wizards.</p>
<p>A wizard (also called an assistant on macOS) is a special type of input dialog that consists of a sequence of pages. A wizard's purpose is to guide the user through a process step by step. Wizards are useful for complex or infrequent tasks that users may find difficult to learn.</p>
<p><a href="qwizard.html">QWizard</a> inherits <a href="qdialog.html">QDialog</a> and represents a wizard. Each page is a <a href="qwizardpage.html">QWizardPage</a> (a <a href="qwidget.html">QWidget</a> subclass). To create your own wizards, you can use these classes directly, or you can subclass them for more control.</p>
<p>Topics:</p>
<a name="a-trivial-example"></a>
<h3 id="a-trivial-example">A Trivial Example</h3>
<p>The following example illustrates how to create wizard pages and add them to a wizard. For more advanced examples, see <a href="qtwidgets-dialogs-classwizard-example.html">Class Wizard</a> and <a href="qtwidgets-dialogs-licensewizard-example.html">License Wizard</a>.</p>
<pre class="cpp">

  <span class="type"><a href="qwizardpage.html">QWizardPage</a></span> <span class="operator">*</span>createIntroPage()
  {
      <span class="type"><a href="qwizardpage.html">QWizardPage</a></span> <span class="operator">*</span>page <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qwizardpage.html">QWizardPage</a></span>;
      page<span class="operator">-</span><span class="operator">&gt;</span>setTitle(<span class="string">&quot;Introduction&quot;</span>);

      <span class="type"><a href="qlabel.html">QLabel</a></span> <span class="operator">*</span>label <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(<span class="string">&quot;This wizard will help you register your copy &quot;</span>
                                 <span class="string">&quot;of Super Product Two.&quot;</span>);
      label<span class="operator">-</span><span class="operator">&gt;</span>setWordWrap(<span class="keyword">true</span>);

      <span class="type"><a href="qvboxlayout.html">QVBoxLayout</a></span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qvboxlayout.html">QVBoxLayout</a></span>;
      layout<span class="operator">-</span><span class="operator">&gt;</span>addWidget(label);
      page<span class="operator">-</span><span class="operator">&gt;</span>setLayout(layout);

      <span class="keyword">return</span> page;
  }

  <span class="type"><a href="qwizardpage.html">QWizardPage</a></span> <span class="operator">*</span>createRegistrationPage()
  {
      ...
  }

  <span class="type"><a href="qwizardpage.html">QWizardPage</a></span> <span class="operator">*</span>createConclusionPage()
  {
      ...
  }

  <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
  {
      <span class="type"><a href="../qtcore/qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setAttribute(<span class="type">Qt</span><span class="operator">::</span>AA_UseHighDpiPixmaps);

      <span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);

  <span class="preprocessor">#ifndef QT_NO_TRANSLATION</span>
      <span class="type"><a href="../qtcore/qstring.html">QString</a></span> translatorFileName <span class="operator">=</span> QLatin1String(<span class="string">&quot;qt_&quot;</span>);
      translatorFileName <span class="operator">+</span><span class="operator">=</span> <span class="type"><a href="../qtcore/qlocale.html">QLocale</a></span><span class="operator">::</span>system()<span class="operator">.</span>name();
      <span class="type"><a href="../qtcore/qtranslator.html">QTranslator</a></span> <span class="operator">*</span>translator <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="../qtcore/qtranslator.html">QTranslator</a></span>(<span class="operator">&amp;</span>app);
      <span class="keyword">if</span> (translator<span class="operator">-</span><span class="operator">&gt;</span>load(translatorFileName<span class="operator">,</span> <span class="type"><a href="../qtcore/qlibraryinfo.html">QLibraryInfo</a></span><span class="operator">::</span>location(<span class="type"><a href="../qtcore/qlibraryinfo.html">QLibraryInfo</a></span><span class="operator">::</span>TranslationsPath)))
          app<span class="operator">.</span>installTranslator(translator);
  <span class="preprocessor">#endif</span>

      <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span> wizard;
      wizard<span class="operator">.</span>addPage(createIntroPage());
      wizard<span class="operator">.</span>addPage(createRegistrationPage());
      wizard<span class="operator">.</span>addPage(createConclusionPage());

      wizard<span class="operator">.</span>setWindowTitle(<span class="string">&quot;Trivial Wizard&quot;</span>);
      wizard<span class="operator">.</span>show();

      <span class="keyword">return</span> app<span class="operator">.</span>exec();
  }

</pre>
<a name="wizard-look-and-feel"></a>
<h3 id="wizard-look-and-feel">Wizard Look and Feel</h3>
<p><a href="qwizard.html">QWizard</a> supports four wizard looks:</p>
<ul>
<li><a href="qwizard.html#WizardStyle-enum">ClassicStyle</a></li>
<li><a href="qwizard.html#WizardStyle-enum">ModernStyle</a></li>
<li><a href="qwizard.html#WizardStyle-enum">MacStyle</a></li>
<li><a href="qwizard.html#WizardStyle-enum">AeroStyle</a></li>
</ul>
<p>You can explicitly set the look to use using <a href="qwizard.html#wizardStyle-prop">setWizardStyle</a>() (e.g&#x2e;, if you want the same look on all platforms).</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th ><a href="qwizard.html#WizardStyle-enum">ClassicStyle</a></th><th ><a href="qwizard.html#WizardStyle-enum">ModernStyle</a></th><th ><a href="qwizard.html#WizardStyle-enum">MacStyle</a></th><th ><a href="qwizard.html#WizardStyle-enum">AeroStyle</a></th></tr></thead>
<tr valign="top" class="odd"><td ><img src="images/qtwizard-classic1.png" alt="" /></td><td ><img src="images/qtwizard-modern1.png" alt="" /></td><td ><img src="images/qtwizard-mac1.png" alt="" /></td><td ><img src="images/qtwizard-aero1.png" alt="" /></td></tr>
<tr valign="top" class="even"><td ><img src="images/qtwizard-classic2.png" alt="" /></td><td ><img src="images/qtwizard-modern2.png" alt="" /></td><td ><img src="images/qtwizard-mac2.png" alt="" /></td><td ><img src="images/qtwizard-aero2.png" alt="" /></td></tr>
</table></div>
<p>Note: <a href="qwizard.html#WizardStyle-enum">AeroStyle</a> has effect only on a Windows Vista system with alpha compositing enabled. <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> is used as a fallback when this condition is not met.</p>
<p>In addition to the wizard style, there are several options that control the look and feel of the wizard. These can be set using <a href="qwizard.html#setOption">setOption</a>() or <a href="qwizard.html#options-prop">setOptions</a>(). For example, <a href="qwizard.html#WizardOption-enum">HaveHelpButton</a> makes <a href="qwizard.html">QWizard</a> show a <b>Help</b> button along with the other wizard buttons.</p>
<p>You can even change the order of the wizard buttons to any arbitrary order using <a href="qwizard.html#setButtonLayout">setButtonLayout</a>(), and you can add up to three custom buttons (e.g&#x2e;, a <b>Print</b> button) to the button row. This is achieved by calling <a href="qwizard.html#setButton">setButton</a>() or <a href="qwizard.html#setButtonText">setButtonText</a>() with <a href="qwizard.html#WizardButton-enum">CustomButton1</a>, <a href="qwizard.html#WizardButton-enum">CustomButton2</a>, or <a href="qwizard.html#WizardButton-enum">CustomButton3</a> to set up the button, and by enabling the <a href="qwizard.html#WizardOption-enum">HaveCustomButton1</a>, <a href="qwizard.html#WizardOption-enum">HaveCustomButton2</a>, or <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a> options. Whenever the user clicks a custom button, <a href="qwizard.html#customButtonClicked">customButtonClicked</a>() is emitted. For example:</p>
<pre class="cpp">

          wizard()<span class="operator">-</span><span class="operator">&gt;</span>setButtonText(<span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>CustomButton1<span class="operator">,</span> tr(<span class="string">&quot;&amp;Print&quot;</span>));
          wizard()<span class="operator">-</span><span class="operator">&gt;</span>setOption(<span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>HaveCustomButton1<span class="operator">,</span> <span class="keyword">true</span>);
          connect(wizard()<span class="operator">,</span> <span class="operator">&amp;</span><span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>customButtonClicked<span class="operator">,</span>
                  <span class="keyword">this</span><span class="operator">,</span> <span class="operator">&amp;</span>ConclusionPage<span class="operator">::</span>printButtonClicked);

</pre>
<a name="elements-of-a-wizard-page"></a>
<h3 id="elements-of-a-wizard-page">Elements of a Wizard Page</h3>
<p>Wizards consist of a sequence of <a href="qwizardpage.html">QWizardPage</a>s. At any time, only one page is shown. A page has the following attributes:</p>
<ul>
<li>A <a href="qwizardpage.html#title-prop">title</a>.</li>
<li>A <a href="qwizardpage.html#subTitle-prop">subTitle</a>.</li>
<li>A set of pixmaps, which may or may not be honored, depending on the wizard's style:<ul>
<li><a href="qwizard.html#WizardPixmap-enum">WatermarkPixmap</a> (used by <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> and <a href="qwizard.html#WizardStyle-enum">ModernStyle</a>)</li>
<li><a href="qwizard.html#WizardPixmap-enum">BannerPixmap</a> (used by <a href="qwizard.html#WizardStyle-enum">ModernStyle</a>)</li>
<li><a href="qwizard.html#WizardPixmap-enum">LogoPixmap</a> (used by <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> and <a href="qwizard.html#WizardStyle-enum">ModernStyle</a>)</li>
<li><a href="qwizard.html#WizardPixmap-enum">BackgroundPixmap</a> (used by <a href="qwizard.html#WizardStyle-enum">MacStyle</a>)</li>
</ul>
</li>
</ul>
<p>The diagram belows shows how <a href="qwizard.html">QWizard</a> renders these attributes, assuming they are all present and <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> is used:</p>
<p class="centerAlign"><img src="images/qtwizard-nonmacpage.png" alt="" /></p><p>When a <a href="qwizardpage.html#subTitle-prop">subTitle</a> is set, <a href="qwizard.html">QWizard</a> displays it in a header, in which case it also uses the <a href="qwizard.html#WizardPixmap-enum">BannerPixmap</a> and the <a href="qwizard.html#WizardPixmap-enum">LogoPixmap</a> to decorate the header. The <a href="qwizard.html#WizardPixmap-enum">WatermarkPixmap</a> is displayed on the left side, below the header. At the bottom, there is a row of buttons allowing the user to navigate through the pages.</p>
<p>The page itself (the <a href="qwizardpage.html">QWizardPage</a> widget) occupies the area between the header, the watermark, and the button row. Typically, the page is a <a href="qwizardpage.html">QWizardPage</a> on which a <a href="qgridlayout.html">QGridLayout</a> is installed, with standard child widgets (<a href="qlabel.html">QLabel</a>s, <a href="qlineedit.html">QLineEdit</a>s, etc.)&#x2e;</p>
<p>If the wizard's style is <a href="qwizard.html#WizardStyle-enum">MacStyle</a>, the page looks radically different:</p>
<p class="centerAlign"><img src="images/qtwizard-macpage.png" alt="" /></p><p>The watermark, banner, and logo pixmaps are ignored by the <a href="qwizard.html#WizardStyle-enum">MacStyle</a>. If the <a href="qwizard.html#WizardPixmap-enum">BackgroundPixmap</a> is set, it is used as the background for the wizard; otherwise, a default &quot;assistant&quot; image is used.</p>
<p>The title and subtitle are set by calling <a href="qwizardpage.html#title-prop">QWizardPage::setTitle</a>() and <a href="qwizardpage.html#subTitle-prop">QWizardPage::setSubTitle</a>() on the individual pages. They may be plain text or HTML (see <a href="qwizard.html#titleFormat-prop">titleFormat</a> and <a href="qwizard.html#subTitleFormat-prop">subTitleFormat</a>). The pixmaps can be set globally for the entire wizard using <a href="qwizard.html#setPixmap">setPixmap</a>(), or on a per-page basis using <a href="qwizardpage.html#setPixmap">QWizardPage::setPixmap</a>().</p>
<a name="field-mechanism"></a><a name="registering-and-using-fields"></a>
<h3 id="registering-and-using-fields">Registering and Using Fields</h3>
<p>In many wizards, the contents of a page may affect the default values of the fields of a later page. To make it easy to communicate between pages, <a href="qwizard.html">QWizard</a> supports a &quot;field&quot; mechanism that allows you to register a field (e.g&#x2e;, a <a href="qlineedit.html">QLineEdit</a>) on a page and to access its value from any page. It is also possible to specify mandatory fields (i.e&#x2e;, fields that must be filled before the user can advance to the next page).</p>
<p>To register a field, call <a href="qwizardpage.html#registerField">QWizardPage::registerField</a>() field. For example:</p>
<pre class="cpp">

  ClassInfoPage<span class="operator">::</span>ClassInfoPage(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> <span class="operator">*</span>parent)
      : <span class="type"><a href="qwizardpage.html">QWizardPage</a></span>(parent)
  {
      ...
      classNameLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(tr(<span class="string">&quot;&amp;Class name:&quot;</span>));
      classNameLineEdit <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>;
      classNameLabel<span class="operator">-</span><span class="operator">&gt;</span>setBuddy(classNameLineEdit);

      baseClassLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(tr(<span class="string">&quot;B&amp;ase class:&quot;</span>));
      baseClassLineEdit <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>;
      baseClassLabel<span class="operator">-</span><span class="operator">&gt;</span>setBuddy(baseClassLineEdit);

      qobjectMacroCheckBox <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qcheckbox.html">QCheckBox</a></span>(tr(<span class="string">&quot;Generate Q_OBJECT &amp;macro&quot;</span>));

      registerField(<span class="string">&quot;className*&quot;</span><span class="operator">,</span> classNameLineEdit);
      registerField(<span class="string">&quot;baseClass&quot;</span><span class="operator">,</span> baseClassLineEdit);
      registerField(<span class="string">&quot;qobjectMacro&quot;</span><span class="operator">,</span> qobjectMacroCheckBox);
      ...
  }

</pre>
<p>The above code registers three fields, <code>className</code>, <code>baseClass</code>, and <code>qobjectMacro</code>, which are associated with three child widgets. The asterisk (<code>*</code>) next to <code>className</code> denotes a mandatory field.</p>
<a name="initialize-page"></a><p>The fields of any page are accessible from any other page. For example:</p>
<pre class="cpp">

  <span class="type">void</span> OutputFilesPage<span class="operator">::</span>initializePage()
  {
      <span class="type"><a href="../qtcore/qstring.html">QString</a></span> className <span class="operator">=</span> field(<span class="string">&quot;className&quot;</span>)<span class="operator">.</span>toString();
      headerLineEdit<span class="operator">-</span><span class="operator">&gt;</span>setText(className<span class="operator">.</span>toLower() <span class="operator">+</span> <span class="string">&quot;.h&quot;</span>);
      implementationLineEdit<span class="operator">-</span><span class="operator">&gt;</span>setText(className<span class="operator">.</span>toLower() <span class="operator">+</span> <span class="string">&quot;.cpp&quot;</span>);
      outputDirLineEdit<span class="operator">-</span><span class="operator">&gt;</span>setText(<span class="type"><a href="../qtcore/qdir.html">QDir</a></span><span class="operator">::</span>toNativeSeparators(<span class="type"><a href="../qtcore/qdir.html">QDir</a></span><span class="operator">::</span>tempPath()));
  }

</pre>
<p>Here, we call <a href="qwizardpage.html#field">QWizardPage::field</a>() to access the contents of the <code>className</code> field (which was defined in the <code>ClassInfoPage</code>) and use it to initialize the <code>OutputFilePage</code>. The field's contents is returned as a <a href="../qtcore/qvariant.html">QVariant</a>.</p>
<p>When we create a field using <a href="qwizardpage.html#registerField">QWizardPage::registerField</a>(), we pass a unique field name and a widget. We can also provide a Qt property name and a &quot;changed&quot; signal (a signal that is emitted when the property changes) as third and fourth arguments; however, this is not necessary for the most common Qt widgets, such as <a href="qlineedit.html">QLineEdit</a>, <a href="qcheckbox.html">QCheckBox</a>, and <a href="qcombobox.html">QComboBox</a>, because <a href="qwizard.html">QWizard</a> knows which properties to look for.</p>
<a name="mandatory-fields"></a><p>If an asterisk (<code>*</code>) is appended to the name when the property is registered, the field is a <i>mandatory field</i>. When a page has mandatory fields, the <b>Next</b> and/or <b>Finish</b> buttons are enabled only when all mandatory fields are filled.</p>
<p>To consider a field &quot;filled&quot;, <a href="qwizard.html">QWizard</a> simply checks that the field's current value doesn't equal the original value (the value it had when <a href="qwizard.html#initializePage">initializePage</a>() was called). For <a href="qlineedit.html">QLineEdit</a> and <a href="qabstractspinbox.html">QAbstractSpinBox</a> subclasses, <a href="qwizard.html">QWizard</a> also checks that <a href="qlineedit.html#acceptableInput-prop">hasAcceptableInput()</a> returns true, to honor any validator or mask.</p>
<p><a href="qwizard.html">QWizard</a>'s mandatory field mechanism is provided for convenience. A more powerful (but also more cumbersome) alternative is to reimplement <a href="qwizardpage.html#isComplete">QWizardPage::isComplete</a>() and to emit the <a href="qwizardpage.html#completeChanged">QWizardPage::completeChanged</a>() signal whenever the page becomes complete or incomplete.</p>
<p>The enabled/disabled state of the <b>Next</b> and/or <b>Finish</b> buttons is one way to perform validation on the user input. Another way is to reimplement <a href="qwizard.html#validateCurrentPage">validateCurrentPage</a>() (or <a href="qwizardpage.html#validatePage">QWizardPage::validatePage</a>()) to perform some last-minute validation (and show an error message if the user has entered incomplete or invalid information). If the function returns <code>true</code>, the next page is shown (or the wizard finishes); otherwise, the current page stays up.</p>
<a name="creating-linear-wizards"></a>
<h3 id="creating-linear-wizards">Creating Linear Wizards</h3>
<p>Most wizards have a linear structure, with page 1 followed by page 2 and so on until the last page. The <a href="qtwidgets-dialogs-classwizard-example.html">Class Wizard</a> example is such a wizard. With <a href="qwizard.html">QWizard</a>, linear wizards are created by instantiating the <a href="qwizardpage.html">QWizardPage</a>s and inserting them using <a href="qwizard.html#addPage">addPage</a>(). By default, the pages are shown in the order in which they were added. For example:</p>
<pre class="cpp">

  ClassWizard<span class="operator">::</span>ClassWizard(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> <span class="operator">*</span>parent)
      : <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span>(parent)
  {
      addPage(<span class="keyword">new</span> IntroPage);
      addPage(<span class="keyword">new</span> ClassInfoPage);
      addPage(<span class="keyword">new</span> CodeStylePage);
      addPage(<span class="keyword">new</span> OutputFilesPage);
      addPage(<span class="keyword">new</span> ConclusionPage);
      ...
  }

</pre>
<p>When a page is about to be shown, <a href="qwizard.html">QWizard</a> calls <a href="qwizard.html#initializePage">initializePage</a>() (which in turn calls <a href="qwizardpage.html#initializePage">QWizardPage::initializePage</a>()) to fill the page with default values. By default, this function does nothing, but it can be reimplemented to initialize the page's contents based on other pages' fields (see the <a href="qwizard.html#initialize-page">example above</a>).</p>
<p>If the user presses <b>Back</b>, <a href="qwizard.html#cleanupPage">cleanupPage</a>() is called (which in turn calls <a href="qwizardpage.html#cleanupPage">QWizardPage::cleanupPage</a>()). The default implementation resets the page's fields to their original values (the values they had before <a href="qwizard.html#initializePage">initializePage</a>() was called). If you want the <b>Back</b> button to be non-destructive and keep the values entered by the user, simply enable the <a href="qwizard.html#WizardOption-enum">IndependentPages</a> option.</p>
<a name="creating-non-linear-wizards"></a>
<h3 id="creating-non-linear-wizards">Creating Non-Linear Wizards</h3>
<p>Some wizards are more complex in that they allow different traversal paths based on the information provided by the user. The <a href="qtwidgets-dialogs-licensewizard-example.html">License Wizard</a> example illustrates this. It provides five wizard pages; depending on which options are selected, the user can reach different pages.</p>
<p class="centerAlign"><img src="images/licensewizard-flow.png" alt="" /></p><p>In complex wizards, pages are identified by IDs. These IDs are typically defined using an enum. For example:</p>
<pre class="cpp">

  <span class="keyword">class</span> LicenseWizard : <span class="keyword">public</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span>
  {
      ...
      <span class="keyword">enum</span> { Page_Intro<span class="operator">,</span> Page_Evaluate<span class="operator">,</span> Page_Register<span class="operator">,</span> Page_Details<span class="operator">,</span>
             Page_Conclusion };
      ...
  };

</pre>
<p>The pages are inserted using <a href="qwizard.html#setPage">setPage</a>(), which takes an ID and an instance of <a href="qwizardpage.html">QWizardPage</a> (or of a subclass):</p>
<pre class="cpp">

  LicenseWizard<span class="operator">::</span>LicenseWizard(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> <span class="operator">*</span>parent)
      : <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span>(parent)
  {
      setPage(Page_Intro<span class="operator">,</span> <span class="keyword">new</span> IntroPage);
      setPage(Page_Evaluate<span class="operator">,</span> <span class="keyword">new</span> EvaluatePage);
      setPage(Page_Register<span class="operator">,</span> <span class="keyword">new</span> RegisterPage);
      setPage(Page_Details<span class="operator">,</span> <span class="keyword">new</span> DetailsPage);
      setPage(Page_Conclusion<span class="operator">,</span> <span class="keyword">new</span> ConclusionPage);
      ...
  }

</pre>
<p>By default, the pages are shown in increasing ID order. To provide a dynamic order that depends on the options chosen by the user, we must reimplement <a href="qwizardpage.html#nextId">QWizardPage::nextId</a>(). For example:</p>
<pre class="cpp">

  <span class="type">int</span> IntroPage<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">if</span> (evaluateRadioButton<span class="operator">-</span><span class="operator">&gt;</span>isChecked()) {
          <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Evaluate;
      } <span class="keyword">else</span> {
          <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Register;
      }
  }

  <span class="type">int</span> EvaluatePage<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Conclusion;
  }

  <span class="type">int</span> RegisterPage<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">if</span> (upgradeKeyLineEdit<span class="operator">-</span><span class="operator">&gt;</span>text()<span class="operator">.</span>isEmpty()) {
          <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Details;
      } <span class="keyword">else</span> {
          <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Conclusion;
      }
  }

  <span class="type">int</span> DetailsPage<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">return</span> LicenseWizard<span class="operator">::</span>Page_Conclusion;
  }

  <span class="type">int</span> ConclusionPage<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">return</span> <span class="operator">-</span><span class="number">1</span>;
  }

</pre>
<p>It would also be possible to put all the logic in one place, in a <a href="qwizard.html#nextId">QWizard::nextId</a>() reimplementation. For example:</p>
<pre class="cpp">

  <span class="type">int</span> LicenseWizard<span class="operator">::</span>nextId() <span class="keyword">const</span>
  {
      <span class="keyword">switch</span> (currentId()) {
      <span class="keyword">case</span> Page_Intro:
          <span class="keyword">if</span> (field(<span class="string">&quot;intro.evaluate&quot;</span>)<span class="operator">.</span>toBool()) {
              <span class="keyword">return</span> Page_Evaluate;
          } <span class="keyword">else</span> {
              <span class="keyword">return</span> Page_Register;
          }
      <span class="keyword">case</span> Page_Evaluate:
          <span class="keyword">return</span> Page_Conclusion;
      <span class="keyword">case</span> Page_Register:
          <span class="keyword">if</span> (field(<span class="string">&quot;register.upgradeKey&quot;</span>)<span class="operator">.</span>toString()<span class="operator">.</span>isEmpty()) {
              <span class="keyword">return</span> Page_Details;
          } <span class="keyword">else</span> {
              <span class="keyword">return</span> Page_Conclusion;
          }
      <span class="keyword">case</span> Page_Details:
          <span class="keyword">return</span> Page_Conclusion;
      <span class="keyword">case</span> Page_Conclusion:
      <span class="keyword">default</span>:
          <span class="keyword">return</span> <span class="operator">-</span><span class="number">1</span>;
      }
  }

</pre>
<p>To start at another page than the page with the lowest ID, call <a href="qwizard.html#startId-prop">setStartId</a>().</p>
<p>To test whether a page has been visited or not, call <a href="qwizard.html#hasVisitedPage">hasVisitedPage</a>(). For example:</p>
<pre class="cpp">

  <span class="type">void</span> ConclusionPage<span class="operator">::</span>initializePage()
  {
      <span class="type"><a href="../qtcore/qstring.html">QString</a></span> licenseText;

      <span class="keyword">if</span> (wizard()<span class="operator">-</span><span class="operator">&gt;</span>hasVisitedPage(LicenseWizard<span class="operator">::</span>Page_Evaluate)) {
          licenseText <span class="operator">=</span> tr(<span class="string">&quot;&lt;u&gt;Evaluation License Agreement:&lt;/u&gt; &quot;</span>
                           <span class="string">&quot;You can use this software for 30 days and make one &quot;</span>
                           <span class="string">&quot;backup, but you are not allowed to distribute it.&quot;</span>);
      } <span class="keyword">else</span> <span class="keyword">if</span> (wizard()<span class="operator">-</span><span class="operator">&gt;</span>hasVisitedPage(LicenseWizard<span class="operator">::</span>Page_Details)) {
          licenseText <span class="operator">=</span> tr(<span class="string">&quot;&lt;u&gt;First-Time License Agreement:&lt;/u&gt; &quot;</span>
                           <span class="string">&quot;You can use this software subject to the license &quot;</span>
                           <span class="string">&quot;you will receive by email.&quot;</span>);
      } <span class="keyword">else</span> {
          licenseText <span class="operator">=</span> tr(<span class="string">&quot;&lt;u&gt;Upgrade License Agreement:&lt;/u&gt; &quot;</span>
                           <span class="string">&quot;This software is licensed under the terms of your &quot;</span>
                           <span class="string">&quot;current license.&quot;</span>);
      }
      bottomLabel<span class="operator">-</span><span class="operator">&gt;</span>setText(licenseText);
  }

</pre>
</div>
<p><b>See also </b><a href="qwizardpage.html">QWizardPage</a>, <a href="qtwidgets-dialogs-classwizard-example.html">Class Wizard Example</a>, and <a href="qtwidgets-dialogs-licensewizard-example.html">License Wizard Example</a>.</p>
<!-- @@@QWizard -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$WizardButton$$$BackButton$$$NextButton$$$CommitButton$$$FinishButton$$$CancelButton$$$HelpButton$$$CustomButton1$$$CustomButton2$$$CustomButton3$$$Stretch$$$NoButton$$$NStandardButtons$$$NButtons -->
<h3 class="fn" id="WizardButton-enum"><a name="WizardButton-enum"></a>enum QWizard::<span class="name">WizardButton</span></h3>
<p>This enum specifies the buttons in a wizard.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWizard::BackButton</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The <b>Back</b> button (<b>Go Back</b> on macOS)</td></tr>
<tr><td class="topAlign"><code>QWizard::NextButton</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The <b>Next</b> button (<b>Continue</b> on macOS)</td></tr>
<tr><td class="topAlign"><code>QWizard::CommitButton</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The <b>Commit</b> button</td></tr>
<tr><td class="topAlign"><code>QWizard::FinishButton</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The <b>Finish</b> button (<b>Done</b> on macOS)</td></tr>
<tr><td class="topAlign"><code>QWizard::CancelButton</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The <b>Cancel</b> button (see also <a href="qwizard.html#WizardOption-enum">NoCancelButton</a>)</td></tr>
<tr><td class="topAlign"><code>QWizard::HelpButton</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The <b>Help</b> button (see also <a href="qwizard.html#WizardOption-enum">HaveHelpButton</a>)</td></tr>
<tr><td class="topAlign"><code>QWizard::CustomButton1</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The first user-defined button (see also <a href="qwizard.html#WizardOption-enum">HaveCustomButton1</a>)</td></tr>
<tr><td class="topAlign"><code>QWizard::CustomButton2</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The second user-defined button (see also <a href="qwizard.html#WizardOption-enum">HaveCustomButton2</a>)</td></tr>
<tr><td class="topAlign"><code>QWizard::CustomButton3</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The third user-defined button (see also <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a>)</td></tr>
</table></div>
<p>The following value is only useful when calling <a href="qwizard.html#setButtonLayout">setButtonLayout</a>():</p>
<div class="table"><table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWizard::Stretch</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">A horizontal stretch in the button layout</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#setButton">setButton</a>(), <a href="qwizard.html#setButtonText">setButtonText</a>(), <a href="qwizard.html#setButtonLayout">setButtonLayout</a>(), and <a href="qwizard.html#customButtonClicked">customButtonClicked</a>().</p>
<!-- @@@WizardButton -->
<!-- $$$WizardOption$$$IndependentPages$$$IgnoreSubTitles$$$ExtendedWatermarkPixmap$$$NoDefaultButton$$$NoBackButtonOnStartPage$$$NoBackButtonOnLastPage$$$DisabledBackButtonOnLastPage$$$HaveNextButtonOnLastPage$$$HaveFinishButtonOnEarlyPages$$$NoCancelButton$$$CancelButtonOnLeft$$$HaveHelpButton$$$HelpButtonOnRight$$$HaveCustomButton1$$$HaveCustomButton2$$$HaveCustomButton3$$$NoCancelButtonOnLastPage -->
<h3 class="flags" id="WizardOption-enum"><a name="WizardOption-enum"></a>enum QWizard::<span class="name">WizardOption</span><br/>flags QWizard::<span class="name">WizardOptions</span></h3>
<p>This enum specifies various options that affect the look and feel of a wizard.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWizard::IndependentPages</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">The pages are independent of each other (i.e&#x2e;, they don't derive values from each other).</td></tr>
<tr><td class="topAlign"><code>QWizard::IgnoreSubTitles</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Don't show any subtitles, even if they are set.</td></tr>
<tr><td class="topAlign"><code>QWizard::ExtendedWatermarkPixmap</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Extend any <a href="qwizard.html#WizardPixmap-enum">WatermarkPixmap</a> all the way down to the window's edge.</td></tr>
<tr><td class="topAlign"><code>QWizard::NoDefaultButton</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">Don't make the <b>Next</b> or <b>Finish</b> button the dialog's <a href="qpushbutton.html#default-prop">default button</a>.</td></tr>
<tr><td class="topAlign"><code>QWizard::NoBackButtonOnStartPage</code></td><td class="topAlign tblval"><code>0x00000010</code></td><td class="topAlign">Don't show the <b>Back</b> button on the start page.</td></tr>
<tr><td class="topAlign"><code>QWizard::NoBackButtonOnLastPage</code></td><td class="topAlign tblval"><code>0x00000020</code></td><td class="topAlign">Don't show the <b>Back</b> button on the last page.</td></tr>
<tr><td class="topAlign"><code>QWizard::DisabledBackButtonOnLastPage</code></td><td class="topAlign tblval"><code>0x00000040</code></td><td class="topAlign">Disable the <b>Back</b> button on the last page.</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveNextButtonOnLastPage</code></td><td class="topAlign tblval"><code>0x00000080</code></td><td class="topAlign">Show the (disabled) <b>Next</b> button on the last page.</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveFinishButtonOnEarlyPages</code></td><td class="topAlign tblval"><code>0x00000100</code></td><td class="topAlign">Show the (disabled) <b>Finish</b> button on non-final pages.</td></tr>
<tr><td class="topAlign"><code>QWizard::NoCancelButton</code></td><td class="topAlign tblval"><code>0x00000200</code></td><td class="topAlign">Don't show the <b>Cancel</b> button.</td></tr>
<tr><td class="topAlign"><code>QWizard::CancelButtonOnLeft</code></td><td class="topAlign tblval"><code>0x00000400</code></td><td class="topAlign">Put the <b>Cancel</b> button on the left of <b>Back</b> (rather than on the right of <b>Finish</b> or <b>Next</b>).</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveHelpButton</code></td><td class="topAlign tblval"><code>0x00000800</code></td><td class="topAlign">Show the <b>Help</b> button.</td></tr>
<tr><td class="topAlign"><code>QWizard::HelpButtonOnRight</code></td><td class="topAlign tblval"><code>0x00001000</code></td><td class="topAlign">Put the <b>Help</b> button on the far right of the button layout (rather than on the far left).</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveCustomButton1</code></td><td class="topAlign tblval"><code>0x00002000</code></td><td class="topAlign">Show the first user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton1</a>).</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveCustomButton2</code></td><td class="topAlign tblval"><code>0x00004000</code></td><td class="topAlign">Show the second user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton2</a>).</td></tr>
<tr><td class="topAlign"><code>QWizard::HaveCustomButton3</code></td><td class="topAlign tblval"><code>0x00008000</code></td><td class="topAlign">Show the third user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton3</a>).</td></tr>
<tr><td class="topAlign"><code>QWizard::NoCancelButtonOnLastPage</code></td><td class="topAlign tblval"><code>0x00010000</code></td><td class="topAlign">Don't show the <b>Cancel</b> button on the last page.</td></tr>
</table></div>
<p>The WizardOptions type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;WizardOption&gt;. It stores an OR combination of WizardOption values.</p>
<p><b>See also </b><a href="qwizard.html#options-prop">setOptions</a>(), <a href="qwizard.html#setOption">setOption</a>(), and <a href="qwizard.html#testOption">testOption</a>().</p>
<!-- @@@WizardOption -->
<!-- $$$WizardPixmap$$$WatermarkPixmap$$$LogoPixmap$$$BannerPixmap$$$BackgroundPixmap$$$NPixmaps -->
<h3 class="fn" id="WizardPixmap-enum"><a name="WizardPixmap-enum"></a>enum QWizard::<span class="name">WizardPixmap</span></h3>
<p>This enum specifies the pixmaps that can be associated with a page.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWizard::WatermarkPixmap</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The tall pixmap on the left side of a <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> or <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> page</td></tr>
<tr><td class="topAlign"><code>QWizard::LogoPixmap</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The small pixmap on the right side of a <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> or <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> page header</td></tr>
<tr><td class="topAlign"><code>QWizard::BannerPixmap</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The pixmap that occupies the background of a <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> page header</td></tr>
<tr><td class="topAlign"><code>QWizard::BackgroundPixmap</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The pixmap that occupies the background of a <a href="qwizard.html#WizardStyle-enum">MacStyle</a> wizard</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#setPixmap">setPixmap</a>(), <a href="qwizardpage.html#setPixmap">QWizardPage::setPixmap</a>(), and <a href="qwizard.html#elements-of-a-wizard-page">Elements of a Wizard Page</a>.</p>
<!-- @@@WizardPixmap -->
<!-- $$$WizardStyle$$$ClassicStyle$$$ModernStyle$$$MacStyle$$$AeroStyle$$$NStyles -->
<h3 class="fn" id="WizardStyle-enum"><a name="WizardStyle-enum"></a>enum QWizard::<span class="name">WizardStyle</span></h3>
<p>This enum specifies the different looks supported by <a href="qwizard.html">QWizard</a>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QWizard::ClassicStyle</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Classic Windows look</td></tr>
<tr><td class="topAlign"><code>QWizard::ModernStyle</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Modern Windows look</td></tr>
<tr><td class="topAlign"><code>QWizard::MacStyle</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">macOS look</td></tr>
<tr><td class="topAlign"><code>QWizard::AeroStyle</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Windows Aero look</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#wizardStyle-prop">setWizardStyle</a>(), <a href="qwizard.html#WizardOption-enum">WizardOption</a>, and <a href="qwizard.html#wizard-look-and-feel">Wizard Look and Feel</a>.</p>
<!-- @@@WizardStyle -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$currentId-prop$$$currentId$$$currentIdChangedint -->
<h3 class="fn" id="currentId-prop"><a name="currentId-prop"></a><span class="name">currentId</span> : const <span class="type">int</span></h3>
<p>This property holds the ID of the current page</p>
<p>This property cannot be set directly. To change the current page, call <a href="qwizard.html#next">next</a>(), <a href="qwizard.html#back">back</a>(), or <a href="qwizard.html#restart">restart</a>().</p>
<p>By default, this property has a value of -1, indicating that no page is currently shown.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>currentId</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwizard.html#currentIdChanged">currentIdChanged</a></b></span>(int <i>id</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#currentPage">currentPage</a>().</p>
<!-- @@@currentId -->
<!-- $$$options-prop$$$options$$$setOptionsQWizard::WizardOptions -->
<h3 class="fn" id="options-prop"><a name="options-prop"></a><span class="name">options</span> : <span class="type"><a href="qwizard.html#WizardOption-enum">WizardOptions</a></span></h3>
<p>This property holds the various options that affect the look and feel of the wizard</p>
<p>By default, the following options are set (depending on the platform):</p>
<ul>
<li>Windows: <a href="qwizard.html#WizardOption-enum">HelpButtonOnRight</a>.</li>
<li>macOS: <a href="qwizard.html#WizardOption-enum">NoDefaultButton</a> and <a href="qwizard.html#WizardOption-enum">NoCancelButton</a>.</li>
<li>X11 and QWS (Qt for Embedded Linux): none.</li>
</ul>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QWizard::WizardOptions </td><td class="memItemRight bottomAlign"><span class="name"><b>options</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOptions</b></span>(QWizard::WizardOptions <i>options</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#wizardStyle-prop">wizardStyle</a>.</p>
<!-- @@@options -->
<!-- $$$startId-prop$$$startId$$$setStartIdint -->
<h3 class="fn" id="startId-prop"><a name="startId-prop"></a><span class="name">startId</span> : <span class="type">int</span></h3>
<p>This property holds the ID of the first page</p>
<p>If this property isn't explicitly set, this property defaults to the lowest page ID in this wizard, or -1 if no page has been inserted yet.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>startId</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setStartId</b></span>(int <i>id</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#restart">restart</a>() and <a href="qwizard.html#nextId">nextId</a>().</p>
<!-- @@@startId -->
<!-- $$$subTitleFormat-prop$$$subTitleFormat$$$setSubTitleFormatQt::TextFormat -->
<h3 class="fn" id="subTitleFormat-prop"><a name="subTitleFormat-prop"></a><span class="name">subTitleFormat</span> : <span class="type"><a href="../qtcore/qt.html#TextFormat-enum">Qt::TextFormat</a></span></h3>
<p>This property holds the text format used by page subtitles</p>
<p>The default format is <a href="../qtcore/qt.html#TextFormat-enum">Qt::AutoText</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>subTitleFormat</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSubTitleFormat</b></span>(Qt::TextFormat <i>format</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizardpage.html#title-prop">QWizardPage::title</a> and <a href="qwizard.html#titleFormat-prop">titleFormat</a>.</p>
<!-- @@@subTitleFormat -->
<!-- $$$titleFormat-prop$$$titleFormat$$$setTitleFormatQt::TextFormat -->
<h3 class="fn" id="titleFormat-prop"><a name="titleFormat-prop"></a><span class="name">titleFormat</span> : <span class="type"><a href="../qtcore/qt.html#TextFormat-enum">Qt::TextFormat</a></span></h3>
<p>This property holds the text format used by page titles</p>
<p>The default format is <a href="../qtcore/qt.html#TextFormat-enum">Qt::AutoText</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>titleFormat</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTitleFormat</b></span>(Qt::TextFormat <i>format</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizardpage.html#title-prop">QWizardPage::title</a> and <a href="qwizard.html#subTitleFormat-prop">subTitleFormat</a>.</p>
<!-- @@@titleFormat -->
<!-- $$$wizardStyle-prop$$$wizardStyle$$$setWizardStyleQWizard::WizardStyle -->
<h3 class="fn" id="wizardStyle-prop"><a name="wizardStyle-prop"></a><span class="name">wizardStyle</span> : <span class="type"><a href="qwizard.html#WizardStyle-enum">WizardStyle</a></span></h3>
<p>This property holds the look and feel of the wizard</p>
<p>By default, <a href="qwizard.html">QWizard</a> uses the <a href="qwizard.html#WizardStyle-enum">AeroStyle</a> on a Windows Vista system with alpha compositing enabled, regardless of the current widget style. If this is not the case, the default wizard style depends on the current widget style as follows: <a href="qwizard.html#WizardStyle-enum">MacStyle</a> is the default if the current widget style is QMacStyle, <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> is the default if the current widget style is QWindowsStyle, and <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> is the default in all other cases.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QWizard::WizardStyle </td><td class="memItemRight bottomAlign"><span class="name"><b>wizardStyle</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWizardStyle</b></span>(QWizard::WizardStyle <i>style</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwizard.html#wizard-look-and-feel">Wizard Look and Feel</a> and <a href="qtwidgets-cmake-qt5-wrap-ui.html#options">options</a>.</p>
<!-- @@@wizardStyle -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QWizard[overload1]$$$QWizardQWidget*Qt::WindowFlags -->
<h3 class="fn" id="QWizard"><a name="QWizard"></a>QWizard::<span class="name">QWizard</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = ...)</h3>
<p>Constructs a wizard with the given <i>parent</i> and window <i>flags</i>.</p>
<p><b>See also </b><a href="../qtcore/qobject.html#parent">parent</a>() and <a href="qwidget.html#windowFlags-prop">windowFlags</a>().</p>
<!-- @@@QWizard -->
<!-- $$$~QWizard[overload1]$$$~QWizard -->
<h3 class="fn" id="dtor.QWizard"><a name="dtor.QWizard"></a><code>[virtual] </code>QWizard::<span class="name">~QWizard</span>()</h3>
<p>Destroys the wizard and its pages, releasing any allocated resources.</p>
<!-- @@@~QWizard -->
<!-- $$$addPage[overload1]$$$addPageQWizardPage* -->
<h3 class="fn" id="addPage"><a name="addPage"></a><span class="type">int</span> QWizard::<span class="name">addPage</span>(<span class="type"><a href="qwizardpage.html">QWizardPage</a></span> *<i>page</i>)</h3>
<p>Adds the given <i>page</i> to the wizard, and returns the page's ID.</p>
<p>The ID is guaranteed to be larger than any other ID in the <a href="qwizard.html">QWizard</a> so far.</p>
<p><b>See also </b><a href="qwizard.html#setPage">setPage</a>(), <a href="qwizard.html#page">page</a>(), and <a href="qwizard.html#pageAdded">pageAdded</a>().</p>
<!-- @@@addPage -->
<!-- $$$back[overload1]$$$back -->
<h3 class="fn" id="back"><a name="back"></a><code>[slot] </code><span class="type">void</span> QWizard::<span class="name">back</span>()</h3>
<p>Goes back to the previous page.</p>
<p>This is equivalent to pressing the <b>Back</b> button.</p>
<p><b>See also </b><a href="qwizard.html#next">next</a>(), <a href="qdialog.html#accept">accept</a>(), <a href="qdialog.html#reject">reject</a>(), and <a href="qwizard.html#restart">restart</a>().</p>
<!-- @@@back -->
<!-- $$$button[overload1]$$$buttonQWizard::WizardButton -->
<h3 class="fn" id="button"><a name="button"></a><span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> *QWizard::<span class="name">button</span>(<span class="type"><a href="qwizard.html#WizardButton-enum">QWizard::WizardButton</a></span> <i>which</i>) const</h3>
<p>Returns the button corresponding to role <i>which</i>.</p>
<p><b>See also </b><a href="qwizard.html#setButton">setButton</a>() and <a href="qwizard.html#setButtonText">setButtonText</a>().</p>
<!-- @@@button -->
<!-- $$$buttonText[overload1]$$$buttonTextQWizard::WizardButton -->
<h3 class="fn" id="buttonText"><a name="buttonText"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QWizard::<span class="name">buttonText</span>(<span class="type"><a href="qwizard.html#WizardButton-enum">QWizard::WizardButton</a></span> <i>which</i>) const</h3>
<p>Returns the text on button <i>which</i>.</p>
<p>If a text has ben set using <a href="qwizard.html#setButtonText">setButtonText</a>(), this text is returned.</p>
<p>By default, the text on buttons depends on the <a href="qwizard.html#wizardStyle-prop">wizardStyle</a>. For example, on macOS, the <b>Next</b> button is called <b>Continue</b>.</p>
<p><b>See also </b><a href="qwizard.html#button">button</a>(), <a href="qwizard.html#setButton">setButton</a>(), <a href="qwizard.html#setButtonText">setButtonText</a>(), <a href="qwizardpage.html#buttonText">QWizardPage::buttonText</a>(), and <a href="qwizardpage.html#setButtonText">QWizardPage::setButtonText</a>().</p>
<!-- @@@buttonText -->
<!-- $$$cleanupPage[overload1]$$$cleanupPageint -->
<h3 class="fn" id="cleanupPage"><a name="cleanupPage"></a><code>[virtual protected] </code><span class="type">void</span> QWizard::<span class="name">cleanupPage</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>This virtual function is called by <a href="qwizard.html">QWizard</a> to clean up page <i>id</i> just before the user leaves it by clicking <b>Back</b> (unless the <a href="qwizard.html#WizardOption-enum">QWizard::IndependentPages</a> option is set).</p>
<p>The default implementation calls <a href="qwizardpage.html#cleanupPage">QWizardPage::cleanupPage</a>() on page(<i>id</i>).</p>
<p><b>See also </b><a href="qwizardpage.html#cleanupPage">QWizardPage::cleanupPage</a>() and <a href="qwizard.html#initializePage">initializePage</a>().</p>
<!-- @@@cleanupPage -->
<!-- $$$currentIdChanged -->
<h3 class="fn" id="currentIdChanged"><a name="currentIdChanged"></a><code>[signal] </code><span class="type">void</span> QWizard::<span class="name">currentIdChanged</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>This signal is emitted when the current page changes, with the new current <i>id</i>.</p>
<p><b>Note:</b> Notifier signal for property <a href="qwizard.html#currentId-prop">currentId</a>. </p><p><b>See also </b><a href="qwizard.html#currentId-prop">currentId</a>() and <a href="qwizard.html#currentPage">currentPage</a>().</p>
<!-- @@@currentIdChanged -->
<!-- $$$currentPage[overload1]$$$currentPage -->
<h3 class="fn" id="currentPage"><a name="currentPage"></a><span class="type"><a href="qwizardpage.html">QWizardPage</a></span> *QWizard::<span class="name">currentPage</span>() const</h3>
<p>Returns a pointer to the current page, or 0 if there is no current page (e.g&#x2e;, before the wizard is shown).</p>
<p>This is equivalent to calling page(<a href="qwizard.html#currentId-prop">currentId</a>()).</p>
<p><b>See also </b><a href="qwizard.html#page">page</a>(), <a href="qwizard.html#currentId-prop">currentId</a>(), and <a href="qwizard.html#restart">restart</a>().</p>
<!-- @@@currentPage -->
<!-- $$$customButtonClicked[overload1]$$$customButtonClickedint -->
<h3 class="fn" id="customButtonClicked"><a name="customButtonClicked"></a><code>[signal] </code><span class="type">void</span> QWizard::<span class="name">customButtonClicked</span>(<span class="type">int</span> <i>which</i>)</h3>
<p>This signal is emitted when the user clicks a custom button. <i>which</i> can be <a href="qwizard.html#WizardButton-enum">CustomButton1</a>, <a href="qwizard.html#WizardButton-enum">CustomButton2</a>, or <a href="qwizard.html#WizardButton-enum">CustomButton3</a>.</p>
<p>By default, no custom button is shown. Call <a href="qwizard.html#setOption">setOption</a>() with <a href="qwizard.html#WizardOption-enum">HaveCustomButton1</a>, <a href="qwizard.html#WizardOption-enum">HaveCustomButton2</a>, or <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a> to have one, and use <a href="qwizard.html#setButtonText">setButtonText</a>() or <a href="qwizard.html#setButton">setButton</a>() to configure it.</p>
<p><b>See also </b><a href="qwizard.html#helpRequested">helpRequested</a>().</p>
<!-- @@@customButtonClicked -->
<!-- $$$done[overload1]$$$doneint -->
<h3 class="fn" id="done"><a name="done"></a><code>[override virtual protected] </code><span class="type">void</span> QWizard::<span class="name">done</span>(<span class="type">int</span> <i>result</i>)</h3>
<p>Reimplemented from <a href="qdialog.html#done">QDialog::done</a>().</p>
<!-- @@@done -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[override virtual protected] </code><span class="type">bool</span> QWizard::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#event">QWidget::event</a>().</p>
<!-- @@@event -->
<!-- $$$field[overload1]$$$fieldconstQString& -->
<h3 class="fn" id="field"><a name="field"></a><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QWizard::<span class="name">field</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>) const</h3>
<p>Returns the value of the field called <i>name</i>.</p>
<p>This function can be used to access fields on any page of the wizard.</p>
<p><b>See also </b><a href="qwizardpage.html#registerField">QWizardPage::registerField</a>(), <a href="qwizardpage.html#field">QWizardPage::field</a>(), and <a href="qwizard.html#setField">setField</a>().</p>
<!-- @@@field -->
<!-- $$$hasVisitedPage[overload1]$$$hasVisitedPageint -->
<h3 class="fn" id="hasVisitedPage"><a name="hasVisitedPage"></a><span class="type">bool</span> QWizard::<span class="name">hasVisitedPage</span>(<span class="type">int</span> <i>id</i>) const</h3>
<p>Returns <code>true</code> if the page history contains page <i>id</i>; otherwise, returns <code>false</code>.</p>
<p>Pressing <b>Back</b> marks the current page as &quot;unvisited&quot; again.</p>
<p><b>See also </b><a href="qwizard.html#visitedPages">visitedPages</a>().</p>
<!-- @@@hasVisitedPage -->
<!-- $$$helpRequested[overload1]$$$helpRequested -->
<h3 class="fn" id="helpRequested"><a name="helpRequested"></a><code>[signal] </code><span class="type">void</span> QWizard::<span class="name">helpRequested</span>()</h3>
<p>This signal is emitted when the user clicks the <b>Help</b> button.</p>
<p>By default, no <b>Help</b> button is shown. Call <a href="qwizard.html#setOption">setOption</a>(<a href="qwizard.html#WizardOption-enum">HaveHelpButton</a>, true) to have one.</p>
<p>Example:</p>
<pre class="cpp">

  LicenseWizard<span class="operator">::</span>LicenseWizard(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> <span class="operator">*</span>parent)
      : <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span>(parent)
  {
      ...
      setOption(HaveHelpButton<span class="operator">,</span> <span class="keyword">true</span>);
      connect(<span class="keyword">this</span><span class="operator">,</span> <span class="operator">&amp;</span><span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>helpRequested<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> <span class="operator">&amp;</span>LicenseWizard<span class="operator">::</span>showHelp);
      ...
  }

  <span class="type">void</span> LicenseWizard<span class="operator">::</span>showHelp()
  {
      <span class="keyword">static</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> lastHelpMessage;

      <span class="type"><a href="../qtcore/qstring.html">QString</a></span> message;

      <span class="keyword">switch</span> (currentId()) {
      <span class="keyword">case</span> Page_Intro:
          message <span class="operator">=</span> tr(<span class="string">&quot;The decision you make here will affect which page you &quot;</span>
                       <span class="string">&quot;get to see next.&quot;</span>);
          <span class="keyword">break</span>;
      ...
      <span class="keyword">default</span>:
          message <span class="operator">=</span> tr(<span class="string">&quot;This help is likely not to be of any help.&quot;</span>);
      }

      <span class="type"><a href="qmessagebox.html">QMessageBox</a></span><span class="operator">::</span>information(<span class="keyword">this</span><span class="operator">,</span> tr(<span class="string">&quot;License Wizard Help&quot;</span>)<span class="operator">,</span> message);

  }

</pre>
<p><b>See also </b><a href="qwizard.html#customButtonClicked">customButtonClicked</a>().</p>
<!-- @@@helpRequested -->
<!-- $$$initializePage[overload1]$$$initializePageint -->
<h3 class="fn" id="initializePage"><a name="initializePage"></a><code>[virtual protected] </code><span class="type">void</span> QWizard::<span class="name">initializePage</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>This virtual function is called by <a href="qwizard.html">QWizard</a> to prepare page <i>id</i> just before it is shown either as a result of <a href="qwizard.html#restart">QWizard::restart</a>() being called, or as a result of the user clicking <b>Next</b>. (However, if the <a href="qwizard.html#WizardOption-enum">QWizard::IndependentPages</a> option is set, this function is only called the first time the page is shown.)</p>
<p>By reimplementing this function, you can ensure that the page's fields are properly initialized based on fields from previous pages.</p>
<p>The default implementation calls <a href="qwizardpage.html#initializePage">QWizardPage::initializePage</a>() on page(<i>id</i>).</p>
<p><b>See also </b><a href="qwizardpage.html#initializePage">QWizardPage::initializePage</a>() and <a href="qwizard.html#cleanupPage">cleanupPage</a>().</p>
<!-- @@@initializePage -->
<!-- $$$nativeEvent[overload1]$$$nativeEventconstQByteArray&void*long* -->
<h3 class="fn" id="nativeEvent"><a name="nativeEvent"></a><code>[override virtual protected] </code><span class="type">bool</span> QWizard::<span class="name">nativeEvent</span>(const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &amp;<i>eventType</i>, <span class="type">void</span> *<i>message</i>, <span class="type">long</span> *<i>result</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#nativeEvent">QWidget::nativeEvent</a>().</p>
<!-- @@@nativeEvent -->
<!-- $$$next[overload1]$$$next -->
<h3 class="fn" id="next"><a name="next"></a><code>[slot] </code><span class="type">void</span> QWizard::<span class="name">next</span>()</h3>
<p>Advances to the next page.</p>
<p>This is equivalent to pressing the <b>Next</b> or <b>Commit</b> button.</p>
<p><b>See also </b><a href="qwizard.html#nextId">nextId</a>(), <a href="qwizard.html#back">back</a>(), <a href="qdialog.html#accept">accept</a>(), <a href="qdialog.html#reject">reject</a>(), and <a href="qwizard.html#restart">restart</a>().</p>
<!-- @@@next -->
<!-- $$$nextId[overload1]$$$nextId -->
<h3 class="fn" id="nextId"><a name="nextId"></a><code>[virtual] </code><span class="type">int</span> QWizard::<span class="name">nextId</span>() const</h3>
<p>This virtual function is called by <a href="qwizard.html">QWizard</a> to find out which page to show when the user clicks the <b>Next</b> button.</p>
<p>The return value is the ID of the next page, or -1 if no page follows.</p>
<p>The default implementation calls <a href="qwizardpage.html#nextId">QWizardPage::nextId</a>() on the <a href="qwizard.html#currentPage">currentPage</a>().</p>
<p>By reimplementing this function, you can specify a dynamic page order.</p>
<p><b>See also </b><a href="qwizardpage.html#nextId">QWizardPage::nextId</a>() and <a href="qwizard.html#currentPage">currentPage</a>().</p>
<!-- @@@nextId -->
<!-- $$$page[overload1]$$$pageint -->
<h3 class="fn" id="page"><a name="page"></a><span class="type"><a href="qwizardpage.html">QWizardPage</a></span> *QWizard::<span class="name">page</span>(<span class="type">int</span> <i>id</i>) const</h3>
<p>Returns the page with the given <i>id</i>, or 0 if there is no such page.</p>
<p><b>See also </b><a href="qwizard.html#addPage">addPage</a>() and <a href="qwizard.html#setPage">setPage</a>().</p>
<!-- @@@page -->
<!-- $$$pageAdded[overload1]$$$pageAddedint -->
<h3 class="fn" id="pageAdded"><a name="pageAdded"></a><code>[signal] </code><span class="type">void</span> QWizard::<span class="name">pageAdded</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>This signal is emitted whenever a page is added to the wizard. The page's <i>id</i> is passed as parameter.</p>
<p>This function was introduced in  Qt 4.7.</p>
<p><b>See also </b><a href="qwizard.html#addPage">addPage</a>(), <a href="qwizard.html#setPage">setPage</a>(), and <a href="qwizard.html#startId-prop">startId</a>().</p>
<!-- @@@pageAdded -->
<!-- $$$pageIds[overload1]$$$pageIds -->
<h3 class="fn" id="pageIds"><a name="pageIds"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type">int</span>&gt; QWizard::<span class="name">pageIds</span>() const</h3>
<p>Returns the list of page IDs.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@pageIds -->
<!-- $$$pageRemoved[overload1]$$$pageRemovedint -->
<h3 class="fn" id="pageRemoved"><a name="pageRemoved"></a><code>[signal] </code><span class="type">void</span> QWizard::<span class="name">pageRemoved</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>This signal is emitted whenever a page is removed from the wizard. The page's <i>id</i> is passed as parameter.</p>
<p>This function was introduced in  Qt 4.7.</p>
<p><b>See also </b><a href="qwizard.html#removePage">removePage</a>() and <a href="qwizard.html#startId-prop">startId</a>().</p>
<!-- @@@pageRemoved -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><a name="paintEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QWizard::<span class="name">paintEvent</span>(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$pixmap[overload1]$$$pixmapQWizard::WizardPixmap -->
<h3 class="fn" id="pixmap"><a name="pixmap"></a><span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> QWizard::<span class="name">pixmap</span>(<span class="type"><a href="qwizard.html#WizardPixmap-enum">QWizard::WizardPixmap</a></span> <i>which</i>) const</h3>
<p>Returns the pixmap set for role <i>which</i>.</p>
<p>By default, the only pixmap that is set is the <a href="qwizard.html#WizardPixmap-enum">BackgroundPixmap</a> on macOS version 10.13 and earlier.</p>
<p><b>See also </b><a href="qwizard.html#setPixmap">setPixmap</a>(), <a href="qwizardpage.html#pixmap">QWizardPage::pixmap</a>(), and <a href="qwizard.html#elements-of-a-wizard-page">Elements of a Wizard Page</a>.</p>
<!-- @@@pixmap -->
<!-- $$$removePage[overload1]$$$removePageint -->
<h3 class="fn" id="removePage"><a name="removePage"></a><span class="type">void</span> QWizard::<span class="name">removePage</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>Removes the page with the given <i>id</i>. <a href="qwizard.html#cleanupPage">cleanupPage</a>() will be called if necessary.</p>
<p><b>Note: </b>Removing a page may influence the value of the <a href="qwizard.html#startId-prop">startId</a> property.</p><p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qwizard.html#addPage">addPage</a>(), <a href="qwizard.html#setPage">setPage</a>(), <a href="qwizard.html#pageRemoved">pageRemoved</a>(), and <a href="qwizard.html#startId-prop">startId</a>().</p>
<!-- @@@removePage -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn" id="resizeEvent"><a name="resizeEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QWizard::<span class="name">resizeEvent</span>(<span class="type"><a href="../qtgui/qresizeevent.html">QResizeEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qdialog.html#resizeEvent">QDialog::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$restart[overload1]$$$restart -->
<h3 class="fn" id="restart"><a name="restart"></a><code>[slot] </code><span class="type">void</span> QWizard::<span class="name">restart</span>()</h3>
<p>Restarts the wizard at the start page. This function is called automatically when the wizard is shown.</p>
<p><b>See also </b><a href="qwizard.html#startId-prop">startId</a>().</p>
<!-- @@@restart -->
<!-- $$$setButton[overload1]$$$setButtonQWizard::WizardButtonQAbstractButton* -->
<h3 class="fn" id="setButton"><a name="setButton"></a><span class="type">void</span> QWizard::<span class="name">setButton</span>(<span class="type"><a href="qwizard.html#WizardButton-enum">QWizard::WizardButton</a></span> <i>which</i>, <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> *<i>button</i>)</h3>
<p>Sets the button corresponding to role <i>which</i> to <i>button</i>.</p>
<p>To add extra buttons to the wizard (e.g&#x2e;, a <b>Print</b> button), one way is to call setButton() with <a href="qwizard.html#WizardButton-enum">CustomButton1</a> to <a href="qwizard.html#WizardButton-enum">CustomButton3</a>, and make the buttons visible using the <a href="qwizard.html#WizardOption-enum">HaveCustomButton1</a> to <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a> options.</p>
<p><b>See also </b><a href="qwizard.html#button">button</a>(), <a href="qwizard.html#setButtonText">setButtonText</a>(), <a href="qwizard.html#setButtonLayout">setButtonLayout</a>(), and <a href="qtwidgets-cmake-qt5-wrap-ui.html#options">options</a>.</p>
<!-- @@@setButton -->
<!-- $$$setButtonLayout[overload1]$$$setButtonLayoutconstQList<QWizard::WizardButton>& -->
<h3 class="fn" id="setButtonLayout"><a name="setButtonLayout"></a><span class="type">void</span> QWizard::<span class="name">setButtonLayout</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qwizard.html#WizardButton-enum">QWizard::WizardButton</a></span>&gt; &amp;<i>layout</i>)</h3>
<p>Sets the order in which buttons are displayed to <i>layout</i>, where <i>layout</i> is a list of <a href="qwizard.html#WizardButton-enum">WizardButton</a>s.</p>
<p>The default layout depends on the options (e.g&#x2e;, whether <a href="qwizard.html#WizardOption-enum">HelpButtonOnRight</a>) that are set. You can call this function if you need more control over the buttons' layout than what <a href="qtwidgets-cmake-qt5-wrap-ui.html#options">options</a> already provides.</p>
<p>You can specify horizontal stretches in the layout using <a href="qwizard.html#WizardButton-enum">Stretch</a>.</p>
<p>Example:</p>
<pre class="cpp">

  MyWizard<span class="operator">::</span>MyWizard(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> <span class="operator">*</span>parent)
      : <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span>(parent)
  {
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="type"><a href="../qtcore/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>WizardButton<span class="operator">&gt;</span> layout;
      layout <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>Stretch <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>BackButton <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>CancelButton
             <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>NextButton <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qwizard.html#QWizard">QWizard</a></span><span class="operator">::</span>FinishButton;
      setButtonLayout(layout);
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  }

</pre>
<p><b>See also </b><a href="qwizard.html#setButton">setButton</a>(), <a href="qwizard.html#setButtonText">setButtonText</a>(), and <a href="qwizard.html#options-prop">setOptions</a>().</p>
<!-- @@@setButtonLayout -->
<!-- $$$setButtonText[overload1]$$$setButtonTextQWizard::WizardButtonconstQString& -->
<h3 class="fn" id="setButtonText"><a name="setButtonText"></a><span class="type">void</span> QWizard::<span class="name">setButtonText</span>(<span class="type"><a href="qwizard.html#WizardButton-enum">QWizard::WizardButton</a></span> <i>which</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Sets the text on button <i>which</i> to be <i>text</i>.</p>
<p>By default, the text on buttons depends on the <a href="qwizard.html#wizardStyle-prop">wizardStyle</a>. For example, on macOS, the <b>Next</b> button is called <b>Continue</b>.</p>
<p>To add extra buttons to the wizard (e.g&#x2e;, a <b>Print</b> button), one way is to call setButtonText() with <a href="qwizard.html#WizardButton-enum">CustomButton1</a>, <a href="qwizard.html#WizardButton-enum">CustomButton2</a>, or <a href="qwizard.html#WizardButton-enum">CustomButton3</a> to set their text, and make the buttons visible using the <a href="qwizard.html#WizardOption-enum">HaveCustomButton1</a>, <a href="qwizard.html#WizardOption-enum">HaveCustomButton2</a>, and/or <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a> options.</p>
<p>Button texts may also be set on a per-page basis using <a href="qwizardpage.html#setButtonText">QWizardPage::setButtonText</a>().</p>
<p><b>See also </b><a href="qwizard.html#buttonText">buttonText</a>(), <a href="qwizard.html#setButton">setButton</a>(), <a href="qwizard.html#button">button</a>(), <a href="qwizard.html#setButtonLayout">setButtonLayout</a>(), <a href="qwizard.html#options-prop">setOptions</a>(), and <a href="qwizardpage.html#setButtonText">QWizardPage::setButtonText</a>().</p>
<!-- @@@setButtonText -->
<!-- $$$setDefaultProperty[overload1]$$$setDefaultPropertyconstchar*constchar*constchar* -->
<h3 class="fn" id="setDefaultProperty"><a name="setDefaultProperty"></a><span class="type">void</span> QWizard::<span class="name">setDefaultProperty</span>(const <span class="type">char</span> *<i>className</i>, const <span class="type">char</span> *<i>property</i>, const <span class="type">char</span> *<i>changedSignal</i>)</h3>
<p>Sets the default property for <i>className</i> to be <i>property</i>, and the associated change signal to be <i>changedSignal</i>.</p>
<p>The default property is used when an instance of <i>className</i> (or of one of its subclasses) is passed to <a href="qwizardpage.html#registerField">QWizardPage::registerField</a>() and no property is specified.</p>
<p><a href="qwizard.html">QWizard</a> knows the most common Qt widgets. For these (or their subclasses), you don't need to specify a <i>property</i> or a <i>changedSignal</i>. The table below lists these widgets:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Widget</th><th >Property</th><th >Change Notification Signal</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qabstractbutton.html">QAbstractButton</a></td><td >bool <a href="qabstractbutton.html#checked-prop">checked</a></td><td ><a href="qabstractbutton.html#toggled">toggled()</a></td></tr>
<tr valign="top" class="even"><td ><a href="qabstractslider.html">QAbstractSlider</a></td><td >int <a href="qabstractslider.html#value-prop">value</a></td><td ><a href="qabstractslider.html#valueChanged">valueChanged()</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qcombobox.html">QComboBox</a></td><td >int <a href="qcombobox.html#currentIndex-prop">currentIndex</a></td><td ><a href="qcombobox.html#currentIndexChanged">currentIndexChanged()</a></td></tr>
<tr valign="top" class="even"><td ><a href="qdatetimeedit.html">QDateTimeEdit</a></td><td ><a href="../qtcore/qdatetime.html">QDateTime</a> <a href="qdatetimeedit.html#dateTime-prop">dateTime</a></td><td ><a href="qdatetimeedit.html#dateTimeChanged">dateTimeChanged()</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qlineedit.html">QLineEdit</a></td><td ><a href="../qtcore/qstring.html">QString</a> <a href="qlineedit.html#text-prop">text</a></td><td ><a href="qlineedit.html#textChanged">textChanged()</a></td></tr>
<tr valign="top" class="even"><td ><a href="qlistwidget.html">QListWidget</a></td><td >int <a href="qlistwidget.html#currentRow-prop">currentRow</a></td><td ><a href="qlistwidget.html#currentRowChanged">currentRowChanged()</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qspinbox.html">QSpinBox</a></td><td >int <a href="qspinbox.html#value-prop">value</a></td><td ><a href="qspinbox.html#valueChanged">valueChanged()</a></td></tr>
</table></div>
<p><b>See also </b><a href="qwizardpage.html#registerField">QWizardPage::registerField</a>().</p>
<!-- @@@setDefaultProperty -->
<!-- $$$setField[overload1]$$$setFieldconstQString&constQVariant& -->
<h3 class="fn" id="setField"><a name="setField"></a><span class="type">void</span> QWizard::<span class="name">setField</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>value</i>)</h3>
<p>Sets the value of the field called <i>name</i> to <i>value</i>.</p>
<p>This function can be used to set fields on any page of the wizard.</p>
<p><b>See also </b><a href="qwizardpage.html#registerField">QWizardPage::registerField</a>(), <a href="qwizardpage.html#setField">QWizardPage::setField</a>(), and <a href="qwizard.html#field">field</a>().</p>
<!-- @@@setField -->
<!-- $$$setOption[overload1]$$$setOptionQWizard::WizardOptionbool -->
<h3 class="fn" id="setOption"><a name="setOption"></a><span class="type">void</span> QWizard::<span class="name">setOption</span>(<span class="type"><a href="qwizard.html#WizardOption-enum">QWizard::WizardOption</a></span> <i>option</i>, <span class="type">bool</span> <i>on</i> = true)</h3>
<p>Sets the given <i>option</i> to be enabled if <i>on</i> is true; otherwise, clears the given <i>option</i>.</p>
<p><b>See also </b><a href="qtwidgets-cmake-qt5-wrap-ui.html#options">options</a>, <a href="qwizard.html#testOption">testOption</a>(), and <a href="qwizard.html#wizardStyle-prop">setWizardStyle</a>().</p>
<!-- @@@setOption -->
<!-- $$$setPage[overload1]$$$setPageintQWizardPage* -->
<h3 class="fn" id="setPage"><a name="setPage"></a><span class="type">void</span> QWizard::<span class="name">setPage</span>(<span class="type">int</span> <i>id</i>, <span class="type"><a href="qwizardpage.html">QWizardPage</a></span> *<i>page</i>)</h3>
<p>Adds the given <i>page</i> to the wizard with the given <i>id</i>.</p>
<p><b>Note: </b>Adding a page may influence the value of the <a href="qwizard.html#startId-prop">startId</a> property in case it was not set explicitly.</p><p><b>See also </b><a href="qwizard.html#addPage">addPage</a>(), <a href="qwizard.html#page">page</a>(), and <a href="qwizard.html#pageAdded">pageAdded</a>().</p>
<!-- @@@setPage -->
<!-- $$$setPixmap[overload1]$$$setPixmapQWizard::WizardPixmapconstQPixmap& -->
<h3 class="fn" id="setPixmap"><a name="setPixmap"></a><span class="type">void</span> QWizard::<span class="name">setPixmap</span>(<span class="type"><a href="qwizard.html#WizardPixmap-enum">QWizard::WizardPixmap</a></span> <i>which</i>, const <span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> &amp;<i>pixmap</i>)</h3>
<p>Sets the pixmap for role <i>which</i> to <i>pixmap</i>.</p>
<p>The pixmaps are used by <a href="qwizard.html">QWizard</a> when displaying a page. Which pixmaps are actually used depend on the <a href="qwizard.html#wizard-look-and-feel">wizard style</a>.</p>
<p>Pixmaps can also be set for a specific page using <a href="qwizardpage.html#setPixmap">QWizardPage::setPixmap</a>().</p>
<p><b>See also </b><a href="qwizard.html#pixmap">pixmap</a>(), <a href="qwizardpage.html#setPixmap">QWizardPage::setPixmap</a>(), and <a href="qwizard.html#elements-of-a-wizard-page">Elements of a Wizard Page</a>.</p>
<!-- @@@setPixmap -->
<!-- $$$setSideWidget[overload1]$$$setSideWidgetQWidget* -->
<h3 class="fn" id="setSideWidget"><a name="setSideWidget"></a><span class="type">void</span> QWizard::<span class="name">setSideWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>Sets the given <i>widget</i> to be shown on the left side of the wizard. For styles which use the <a href="qwizard.html#WizardPixmap-enum">WatermarkPixmap</a> (<a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> and <a href="qwizard.html#WizardStyle-enum">ModernStyle</a>) the side widget is displayed on top of the watermark, for other styles or when the watermark is not provided the side widget is displayed on the left side of the wizard.</p>
<p>Passing 0 shows no side widget.</p>
<p>When the <i>widget</i> is not 0 the wizard reparents it.</p>
<p>Any previous side widget is hidden.</p>
<p>You may call setSideWidget() with the same widget at different times.</p>
<p>All widgets set here will be deleted by the wizard when it is destroyed unless you separately reparent the widget after setting some other side widget (or 0).</p>
<p>By default, no side widget is present.</p>
<p>This function was introduced in  Qt 4.7.</p>
<p><b>See also </b><a href="qwizard.html#sideWidget">sideWidget</a>().</p>
<!-- @@@setSideWidget -->
<!-- $$$setVisible[overload1]$$$setVisiblebool -->
<h3 class="fn" id="setVisible"><a name="setVisible"></a><code>[override virtual] </code><span class="type">void</span> QWizard::<span class="name">setVisible</span>(<span class="type">bool</span> <i>visible</i>)</h3>
<p>Reimplemented from <a href="qdialog.html#setVisible">QDialog::setVisible</a>().</p>
<!-- @@@setVisible -->
<!-- $$$sideWidget[overload1]$$$sideWidget -->
<h3 class="fn" id="sideWidget"><a name="sideWidget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QWizard::<span class="name">sideWidget</span>() const</h3>
<p>Returns the widget on the left side of the wizard or 0.</p>
<p>By default, no side widget is present.</p>
<p>This function was introduced in  Qt 4.7.</p>
<p><b>See also </b><a href="qwizard.html#setSideWidget">setSideWidget</a>().</p>
<!-- @@@sideWidget -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn" id="sizeHint"><a name="sizeHint"></a><code>[override virtual] </code><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QWizard::<span class="name">sizeHint</span>() const</h3>
<p>Reimplemented from <a href="qdialog.html#sizeHint">QDialog::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$testOption[overload1]$$$testOptionQWizard::WizardOption -->
<h3 class="fn" id="testOption"><a name="testOption"></a><span class="type">bool</span> QWizard::<span class="name">testOption</span>(<span class="type"><a href="qwizard.html#WizardOption-enum">QWizard::WizardOption</a></span> <i>option</i>) const</h3>
<p>Returns <code>true</code> if the given <i>option</i> is enabled; otherwise, returns false.</p>
<p><b>See also </b><a href="qtwidgets-cmake-qt5-wrap-ui.html#options">options</a>, <a href="qwizard.html#setOption">setOption</a>(), and <a href="qwizard.html#wizardStyle-prop">setWizardStyle</a>().</p>
<!-- @@@testOption -->
<!-- $$$validateCurrentPage[overload1]$$$validateCurrentPage -->
<h3 class="fn" id="validateCurrentPage"><a name="validateCurrentPage"></a><code>[virtual] </code><span class="type">bool</span> QWizard::<span class="name">validateCurrentPage</span>()</h3>
<p>This virtual function is called by <a href="qwizard.html">QWizard</a> when the user clicks <b>Next</b> or <b>Finish</b> to perform some last-minute validation. If it returns <code>true</code>, the next page is shown (or the wizard finishes); otherwise, the current page stays up.</p>
<p>The default implementation calls <a href="qwizardpage.html#validatePage">QWizardPage::validatePage</a>() on the <a href="qwizard.html#currentPage">currentPage</a>().</p>
<p>When possible, it is usually better style to disable the <b>Next</b> or <b>Finish</b> button (by specifying <a href="qwizard.html#mandatory-fields">mandatory fields</a> or by reimplementing <a href="qwizardpage.html#isComplete">QWizardPage::isComplete</a>()) than to reimplement validateCurrentPage().</p>
<p><b>See also </b><a href="qwizardpage.html#validatePage">QWizardPage::validatePage</a>() and <a href="qwizard.html#currentPage">currentPage</a>().</p>
<!-- @@@validateCurrentPage -->
<!-- $$$visitedPages[overload1]$$$visitedPages -->
<h3 class="fn" id="visitedPages"><a name="visitedPages"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type">int</span>&gt; QWizard::<span class="name">visitedPages</span>() const</h3>
<p>Returns the list of IDs of visited pages, in the order in which the pages were visited.</p>
<p>Pressing <b>Back</b> marks the current page as &quot;unvisited&quot; again.</p>
<p><b>See also </b><a href="qwizard.html#hasVisitedPage">hasVisitedPage</a>().</p>
<!-- @@@visitedPages -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</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>