1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924
  
     | 
    
      <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwizard.cpp -->
  <title>Qt 4.8: QWizard Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QWizard</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<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="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">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>
<h1 class="title">QWizard Class Reference</h1>
<!-- $$$QWizard-brief -->
<p>The QWizard class provides a framework for wizards. <a href="#details">More...</a></p>
<!-- @@@QWizard -->
<pre class="cpp"> <span class="preprocessor">#include <QWizard></span></pre><p><b>Inherits: </b><a href="qdialog.html">QDialog</a>.</p>
<p>This class was introduced in Qt 4.3.</p>
<ul>
<li><a href="qwizard-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<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, ..., HaveCustomButton3 }</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>
<a name="properties"></a>
<h2>Properties</h2>
<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>
<ul>
<li class="fn">2 properties inherited from <a href="qdialog.html#properties">QDialog</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<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> = 0, Qt::WindowFlags <i>flags</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </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> ( 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> ( 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 & <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"> 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<int> </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> ( 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> ( 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<WizardButton> & <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> ( WizardButton <i>which</i>, const QString & <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 & <i>name</i>, const QVariant & <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> ( 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> ( 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> ( WizardPixmap <i>which</i>, const QPixmap & <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> ( 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> ( 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<int> </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#visitedPages">visitedPages</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> WizardStyle </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#wizardStyle-prop">wizardStyle</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<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> )</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</td></tr>
</table>
<ul>
<li class="fn">8 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<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>
<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="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<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>
<ul>
<li class="fn">3 signals inherited from <a href="qdialog.html#signals">QDialog</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<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>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<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> )</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> )</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> )</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> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwizard.html#winEvent">winEvent</a></b> ( MSG * <i>message</i>, long * <i>result</i> )</td></tr>
</table>
<ul>
<li class="fn">7 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<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>Detailed Description</h2>
<p>The QWizard class provides a framework for wizards.</p>
<p>A wizard (also called an assistant on Mac OS X) 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>QWizard 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>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="dialogs-classwizard.html">Class Wizard</a> and <a href="dialogs-licensewizard.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">></span>setTitle(<span class="string">"Introduction"</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">"This wizard will help you register your copy "</span>
                                <span class="string">"of Super Product Two."</span>);
     label<span class="operator">-</span><span class="operator">></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">></span>addWidget(label);
     page<span class="operator">-</span><span class="operator">></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="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
     <span class="type"><a href="qstring.html">QString</a></span> translatorFileName <span class="operator">=</span> QLatin1String(<span class="string">"qt_"</span>);
     translatorFileName <span class="operator">+</span><span class="operator">=</span> <span class="type"><a href="qlocale.html">QLocale</a></span><span class="operator">::</span>system()<span class="operator">.</span>name();
     <span class="type"><a href="qtranslator.html">QTranslator</a></span> <span class="operator">*</span>translator <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtranslator.html">QTranslator</a></span>(<span class="operator">&</span>app);
     <span class="keyword">if</span> (translator<span class="operator">-</span><span class="operator">></span>load(translatorFileName<span class="operator">,</span> <span class="type"><a href="qlibraryinfo.html">QLibraryInfo</a></span><span class="operator">::</span>location(<span class="type"><a href="qlibraryinfo.html">QLibraryInfo</a></span><span class="operator">::</span>TranslationsPath)))
         app<span class="operator">.</span>installTranslator(translator);
     <span class="type">QWizard</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">"Trivial Wizard"</span>);
 <span class="preprocessor">#ifdef Q_OS_SYMBIAN</span>
     wizard<span class="operator">.</span>showMaximized();
 <span class="preprocessor">#else</span>
     wizard<span class="operator">.</span>show();
 <span class="preprocessor">#endif</span>
     <span class="keyword">return</span> app<span class="operator">.</span>exec();
 }</pre>
<a name="wizard-look-and-feel"></a>
<h3>Wizard Look and Feel</h3>
<p>QWizard 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., if you want the same look on all platforms).</p>
<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>
<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 QWizard 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., 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">></span>setButtonText(<span class="type">QWizard</span><span class="operator">::</span>CustomButton1<span class="operator">,</span> tr(<span class="string">"&Print"</span>));
         wizard()<span class="operator">-</span><span class="operator">></span>setOption(<span class="type">QWizard</span><span class="operator">::</span>HaveCustomButton1<span class="operator">,</span> <span class="keyword">true</span>);
         connect(wizard()<span class="operator">,</span> SIGNAL(customButtonClicked(<span class="type">int</span>))<span class="operator">,</span>
                 <span class="keyword">this</span><span class="operator">,</span> SLOT(printButtonClicked()));</pre>
<a name="elements-of-a-wizard-page"></a>
<h3>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 QWizard 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, QWizard 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.).</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 "assistant" 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>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, QWizard supports a "field" mechanism that allows you to register a field (e.g., 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., 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</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">"&Class name:"</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">></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">"B&ase class:"</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">></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">"Generate Q_OBJECT &macro"</span>));
     registerField(<span class="string">"className*"</span><span class="operator">,</span> classNameLineEdit);
     registerField(<span class="string">"baseClass"</span><span class="operator">,</span> baseClassLineEdit);
     registerField(<span class="string">"qobjectMacro"</span><span class="operator">,</span> qobjectMacroCheckBox);
     ...
 }</pre>
<p>The above code registers three fields, <tt>className</tt>, <tt>baseClass</tt>, and <tt>qobjectMacro</tt>, which are associated with three child widgets. The asterisk (<tt>*</tt>) next to <tt>className</tt> 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><a href="qwizard.html#initializePage">initializePage</a>()
 {
     <span class="type"><a href="qstring.html">QString</a></span> className <span class="operator">=</span> field(<span class="string">"className"</span>)<span class="operator">.</span>toString();
     headerLineEdit<span class="operator">-</span><span class="operator">></span>setText(className<span class="operator">.</span>toLower() <span class="operator">+</span> <span class="string">".h"</span>);
     implementationLineEdit<span class="operator">-</span><span class="operator">></span>setText(className<span class="operator">.</span>toLower() <span class="operator">+</span> <span class="string">".cpp"</span>);
     outputDirLineEdit<span class="operator">-</span><span class="operator">></span>setText(<span class="type"><a href="qdir.html">QDir</a></span><span class="operator">::</span>convertSeparators(<span class="type"><a href="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 <tt>className</tt> field (which was defined in the <tt>ClassInfoPage</tt>) and use it to initialize the <tt>OuputFilePage</tt>. The field's contents is returned as a <a href="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 "changed" 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 QWizard knows which properties to look for.</p>
<a name="mandatory-fields"></a><p>If an asterisk (<tt>*</tt>) 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 "filled", QWizard 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, QWizard also checks that <a href="qlineedit.html#acceptableInput-prop">hasAcceptableInput()</a> returns true, to honor any validator or mask.</p>
<p>QWizard'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 true, the next page is shown (or the wizard finishes); otherwise, the current page stays up.</p>
<a name="creating-linear-wizards"></a>
<h3>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="dialogs-classwizard.html">Class Wizard</a> example is such a wizard. With QWizard, 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</a></span> <span class="operator">*</span>parent)
     : <span class="type">QWizard</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, QWizard 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="#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>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="dialogs-licensewizard.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">QWizard</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</a></span> <span class="operator">*</span>parent)
     : <span class="type">QWizard</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><a href="qwizard.html#nextId">nextId</a>() <span class="keyword">const</span>
 {
     <span class="keyword">if</span> (evaluateRadioButton<span class="operator">-</span><span class="operator">></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><a href="qwizard.html#nextId">nextId</a>() <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><a href="qwizard.html#nextId">nextId</a>() <span class="keyword">const</span>
 {
     <span class="keyword">if</span> (upgradeKeyLineEdit<span class="operator">-</span><span class="operator">></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><a href="qwizard.html#nextId">nextId</a>() <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><a href="qwizard.html#nextId">nextId</a>() <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><a href="qwizard.html#nextId">nextId</a>() <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">"intro.evaluate"</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">"register.upgradeKey"</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><a href="qwizard.html#initializePage">initializePage</a>()
 {
     <span class="type"><a href="qstring.html">QString</a></span> licenseText;
     <span class="keyword">if</span> (wizard()<span class="operator">-</span><span class="operator">></span>hasVisitedPage(LicenseWizard<span class="operator">::</span>Page_Evaluate)) {
         licenseText <span class="operator">=</span> tr(<span class="string">"<u>Evaluation License Agreement:</u> "</span>
                          <span class="string">"You can use this software for 30 days and make one "</span>
                          <span class="string">"backup, but you are not allowed to distribute it."</span>);
     } <span class="keyword">else</span> <span class="keyword">if</span> (wizard()<span class="operator">-</span><span class="operator">></span>hasVisitedPage(LicenseWizard<span class="operator">::</span>Page_Details)) {
         licenseText <span class="operator">=</span> tr(<span class="string">"<u>First-Time License Agreement:</u> "</span>
                          <span class="string">"You can use this software subject to the license "</span>
                          <span class="string">"you will receive by email."</span>);
     } <span class="keyword">else</span> {
         licenseText <span class="operator">=</span> tr(<span class="string">"<u>Upgrade License Agreement:</u> "</span>
                          <span class="string">"This software is licensed under the terms of your "</span>
                          <span class="string">"current license."</span>);
     }
     bottomLabel<span class="operator">-</span><span class="operator">></span>setText(licenseText);
 }</pre>
</div>
<p><b>See also </b><a href="qwizardpage.html">QWizardPage</a>, <a href="dialogs-classwizard.html">Class Wizard Example</a>, and <a href="dialogs-licensewizard.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"><a name="WizardButton-enum"></a>enum QWizard::<span class="name">WizardButton</span></h3>
<p>This enum specifies the buttons in a wizard.</p>
<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"><tt>QWizard::BackButton</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The <b>Back</b> button (<b>Go Back</b> on Mac OS X)</td></tr>
<tr><td class="topAlign"><tt>QWizard::NextButton</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The <b>Next</b> button (<b>Continue</b> on Mac OS X)</td></tr>
<tr><td class="topAlign"><tt>QWizard::CommitButton</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The <b>Commit</b> button</td></tr>
<tr><td class="topAlign"><tt>QWizard::FinishButton</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The <b>Finish</b> button (<b>Done</b> on Mac OS X)</td></tr>
<tr><td class="topAlign"><tt>QWizard::CancelButton</tt></td><td class="topAlign"><tt>4</tt></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"><tt>QWizard::HelpButton</tt></td><td class="topAlign"><tt>5</tt></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"><tt>QWizard::CustomButton1</tt></td><td class="topAlign"><tt>6</tt></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"><tt>QWizard::CustomButton2</tt></td><td class="topAlign"><tt>7</tt></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"><tt>QWizard::CustomButton3</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The third user-defined button (see also <a href="qwizard.html#WizardOption-enum">HaveCustomButton3</a>)</td></tr>
</table>
<p>The following value is only useful when calling <a href="qwizard.html#setButtonLayout">setButtonLayout</a>():</p>
<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"><tt>QWizard::Stretch</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">A horizontal stretch in the button layout</td></tr>
</table>
<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 -->
<h3 class="flags"><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>
<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"><tt>QWizard::IndependentPages</tt></td><td class="topAlign"><tt>0x00000001</tt></td><td class="topAlign">The pages are independent of each other (i.e., they don't derive values from each other).</td></tr>
<tr><td class="topAlign"><tt>QWizard::IgnoreSubTitles</tt></td><td class="topAlign"><tt>0x00000002</tt></td><td class="topAlign">Don't show any subtitles, even if they are set.</td></tr>
<tr><td class="topAlign"><tt>QWizard::ExtendedWatermarkPixmap</tt></td><td class="topAlign"><tt>0x00000004</tt></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"><tt>QWizard::NoDefaultButton</tt></td><td class="topAlign"><tt>0x00000008</tt></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"><tt>QWizard::NoBackButtonOnStartPage</tt></td><td class="topAlign"><tt>0x00000010</tt></td><td class="topAlign">Don't show the <b>Back</b> button on the start page.</td></tr>
<tr><td class="topAlign"><tt>QWizard::NoBackButtonOnLastPage</tt></td><td class="topAlign"><tt>0x00000020</tt></td><td class="topAlign">Don't show the <b>Back</b> button on the last page.</td></tr>
<tr><td class="topAlign"><tt>QWizard::DisabledBackButtonOnLastPage</tt></td><td class="topAlign"><tt>0x00000040</tt></td><td class="topAlign">Disable the <b>Back</b> button on the last page.</td></tr>
<tr><td class="topAlign"><tt>QWizard::HaveNextButtonOnLastPage</tt></td><td class="topAlign"><tt>0x00000080</tt></td><td class="topAlign">Show the (disabled) <b>Next</b> button on the last page.</td></tr>
<tr><td class="topAlign"><tt>QWizard::HaveFinishButtonOnEarlyPages</tt></td><td class="topAlign"><tt>0x00000100</tt></td><td class="topAlign">Show the (disabled) <b>Finish</b> button on non-final pages.</td></tr>
<tr><td class="topAlign"><tt>QWizard::NoCancelButton</tt></td><td class="topAlign"><tt>0x00000200</tt></td><td class="topAlign">Don't show the <b>Cancel</b> button.</td></tr>
<tr><td class="topAlign"><tt>QWizard::CancelButtonOnLeft</tt></td><td class="topAlign"><tt>0x00000400</tt></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"><tt>QWizard::HaveHelpButton</tt></td><td class="topAlign"><tt>0x00000800</tt></td><td class="topAlign">Show the <b>Help</b> button.</td></tr>
<tr><td class="topAlign"><tt>QWizard::HelpButtonOnRight</tt></td><td class="topAlign"><tt>0x00001000</tt></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"><tt>QWizard::HaveCustomButton1</tt></td><td class="topAlign"><tt>0x00002000</tt></td><td class="topAlign">Show the first user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton1</a>).</td></tr>
<tr><td class="topAlign"><tt>QWizard::HaveCustomButton2</tt></td><td class="topAlign"><tt>0x00004000</tt></td><td class="topAlign">Show the second user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton2</a>).</td></tr>
<tr><td class="topAlign"><tt>QWizard::HaveCustomButton3</tt></td><td class="topAlign"><tt>0x00008000</tt></td><td class="topAlign">Show the third user-defined button (<a href="qwizard.html#WizardButton-enum">CustomButton3</a>).</td></tr>
</table>
<p>The WizardOptions type is a typedef for <a href="qflags.html">QFlags</a><WizardOption>. 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"><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>
<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"><tt>QWizard::WatermarkPixmap</tt></td><td class="topAlign"><tt>0</tt></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"><tt>QWizard::LogoPixmap</tt></td><td class="topAlign"><tt>1</tt></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"><tt>QWizard::BannerPixmap</tt></td><td class="topAlign"><tt>2</tt></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"><tt>QWizard::BackgroundPixmap</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The pixmap that occupies the background of a <a href="qwizard.html#WizardStyle-enum">MacStyle</a> wizard</td></tr>
</table>
<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"><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>
<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"><tt>QWizard::ClassicStyle</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Classic Windows look</td></tr>
<tr><td class="topAlign"><tt>QWizard::ModernStyle</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Modern Windows look</td></tr>
<tr><td class="topAlign"><tt>QWizard::MacStyle</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Mac OS X look</td></tr>
<tr><td class="topAlign"><tt>QWizard::AeroStyle</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Windows Aero look</td></tr>
</table>
<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"><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>
<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>
<p><b>Notifier signal:</b></p>
<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>
<p><b>See also </b><a href="qwizard.html#currentIdChanged">currentIdChanged</a>() and <a href="qwizard.html#currentPage">currentPage</a>().</p>
<!-- @@@currentId -->
<!-- $$$options-prop$$$options$$$setOptionsWizardOptions -->
<h3 class="fn"><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>Mac OS X: <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>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> 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> ( WizardOptions <i>options</i> )</td></tr>
</table>
<p><b>See also </b><a href="qwizard.html#wizardStyle-prop">wizardStyle</a>.</p>
<!-- @@@options -->
<!-- $$$startId-prop$$$startId$$$setStartIdint -->
<h3 class="fn"><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>
<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>
<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"><a name="subTitleFormat-prop"></a><span class="name">subTitleFormat</span> : <span class="type"><a href="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="qt.html#TextFormat-enum">Qt::AutoText</a>.</p>
<p><b>Access functions:</b></p>
<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>
<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"><a name="titleFormat-prop"></a><span class="name">titleFormat</span> : <span class="type"><a href="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="qt.html#TextFormat-enum">Qt::AutoText</a>.</p>
<p><b>Access functions:</b></p>
<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>
<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$$$setWizardStyleWizardStyle -->
<h3 class="fn"><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 <a href="qmacstyle.html">QMacStyle</a>, <a href="qwizard.html#WizardStyle-enum">ModernStyle</a> is the default if the current widget style is <a href="qwindowsstyle.html">QWindowsStyle</a>, and <a href="qwizard.html#WizardStyle-enum">ClassicStyle</a> is the default in all other cases.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> 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> ( WizardStyle <i>style</i> )</td></tr>
</table>
<p><b>See also </b><a href="qwizard.html#wizard-look-and-feel">Wizard Look and Feel</a> and <a href="qwizard.html#options-prop">options</a>.</p>
<!-- @@@wizardStyle -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QWizard[overload1]$$$QWizardQWidget*Qt::WindowFlags -->
<h3 class="fn"><a name="QWizard"></a>QWizard::<span class="name">QWizard</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = 0 )</h3>
<p>Constructs a wizard with the given <i>parent</i> and window <i>flags</i>.</p>
<p><b>See also </b><a href="qobject.html#parent">parent</a>() and <a href="qwidget.html#windowFlags-prop">windowFlags</a>().</p>
<!-- @@@QWizard -->
<!-- $$$~QWizard[overload1]$$$~QWizard -->
<h3 class="fn"><a name="dtor.QWizard"></a>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"><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"><a name="back"></a><span class="type">void</span> QWizard::<span class="name">back</span> ()<tt> [slot]</tt></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]$$$buttonWizardButton -->
<h3 class="fn"><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">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]$$$buttonTextWizardButton -->
<h3 class="fn"><a name="buttonText"></a><span class="type"><a href="qstring.html">QString</a></span> QWizard::<span class="name">buttonText</span> ( <span class="type"><a href="qwizard.html#WizardButton-enum">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 Mac OS X, 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"><a name="cleanupPage"></a><span class="type">void</span> QWizard::<span class="name">cleanupPage</span> ( <span class="type">int</span> <i>id</i> )<tt> [virtual protected]</tt></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[overload1]$$$currentIdChangedint -->
<h3 class="fn"><a name="currentIdChanged"></a><span class="type">void</span> QWizard::<span class="name">currentIdChanged</span> ( <span class="type">int</span> <i>id</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the current page changes, with the new current <i>id</i>.</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"><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., 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"><a name="customButtonClicked"></a><span class="type">void</span> QWizard::<span class="name">customButtonClicked</span> ( <span class="type">int</span> <i>which</i> )<tt> [signal]</tt></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"><a name="done"></a><span class="type">void</span> QWizard::<span class="name">done</span> ( <span class="type">int</span> <i>result</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qdialog.html#done">QDialog::done</a>().</p>
<!-- @@@done -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QWizard::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$field[overload1]$$$fieldconstQString& -->
<h3 class="fn"><a name="field"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QWizard::<span class="name">field</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <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"><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 true if the page history contains page <i>id</i>; otherwise, returns false.</p>
<p>Pressing <b>Back</b> marks the current page as "unvisited" again.</p>
<p><b>See also </b><a href="qwizard.html#visitedPages">visitedPages</a>().</p>
<!-- @@@hasVisitedPage -->
<!-- $$$helpRequested[overload1]$$$helpRequested -->
<h3 class="fn"><a name="helpRequested"></a><span class="type">void</span> QWizard::<span class="name">helpRequested</span> ()<tt> [signal]</tt></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 setOption(<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</a></span> <span class="operator">*</span>parent)
     : <span class="type"><a href="qwizard.html">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> SIGNAL(helpRequested())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(showHelp()));
     ...
 }
 <span class="type">void</span> LicenseWizard<span class="operator">::</span>showHelp()
 {
     <span class="keyword">static</span> <span class="type"><a href="qstring.html">QString</a></span> lastHelpMessage;
     <span class="type"><a href="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">"The decision you make here will affect which page you "</span>
                      <span class="string">"get to see next."</span>);
         <span class="keyword">break</span>;
     ...
     <span class="keyword">default</span>:
         message <span class="operator">=</span> tr(<span class="string">"This help is likely not to be of any help."</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">"License Wizard Help"</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"><a name="initializePage"></a><span class="type">void</span> QWizard::<span class="name">initializePage</span> ( <span class="type">int</span> <i>id</i> )<tt> [virtual protected]</tt></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 -->
<!-- $$$next[overload1]$$$next -->
<h3 class="fn"><a name="next"></a><span class="type">void</span> QWizard::<span class="name">next</span> ()<tt> [slot]</tt></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"><a name="nextId"></a><span class="type">int</span> QWizard::<span class="name">nextId</span> () const<tt> [virtual]</tt></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"><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"><a name="pageAdded"></a><span class="type">void</span> QWizard::<span class="name">pageAdded</span> ( <span class="type">int</span> <i>id</i> )<tt> [signal]</tt></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"><a name="pageIds"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type">int</span>> 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"><a name="pageRemoved"></a><span class="type">void</span> QWizard::<span class="name">pageRemoved</span> ( <span class="type">int</span> <i>id</i> )<tt> [signal]</tt></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"><a name="paintEvent"></a><span class="type">void</span> QWizard::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$pixmap[overload1]$$$pixmapWizardPixmap -->
<h3 class="fn"><a name="pixmap"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QWizard::<span class="name">pixmap</span> ( <span class="type"><a href="qwizard.html#WizardPixmap-enum">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 Mac OS X.</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"><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"><a name="resizeEvent"></a><span class="type">void</span> QWizard::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$restart[overload1]$$$restart -->
<h3 class="fn"><a name="restart"></a><span class="type">void</span> QWizard::<span class="name">restart</span> ()<tt> [slot]</tt></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]$$$setButtonWizardButtonQAbstractButton* -->
<h3 class="fn"><a name="setButton"></a><span class="type">void</span> QWizard::<span class="name">setButton</span> ( <span class="type"><a href="qwizard.html#WizardButton-enum">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., 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="qwizard.html#options-prop">options</a>.</p>
<!-- @@@setButton -->
<!-- $$$setButtonLayout[overload1]$$$setButtonLayoutconstQList<WizardButton>& -->
<h3 class="fn"><a name="setButtonLayout"></a><span class="type">void</span> QWizard::<span class="name">setButtonLayout</span> ( const <span class="type"><a href="qlist.html">QList</a></span><<span class="type"><a href="qwizard.html#WizardButton-enum">WizardButton</a></span>> & <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., 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="qwizard.html#options-prop">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</a></span> <span class="operator">*</span>parent)
     : <span class="type"><a href="qwizard.html">QWizard</a></span>(parent)
 {
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
     <span class="type"><a href="qlist.html">QList</a></span><span class="operator"><</span><span class="type"><a href="qwizard.html">QWizard</a></span><span class="operator">::</span>WizardButton<span class="operator">></span> layout;
     layout <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qwizard.html">QWizard</a></span><span class="operator">::</span>Stretch <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qwizard.html">QWizard</a></span><span class="operator">::</span>BackButton <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qwizard.html">QWizard</a></span><span class="operator">::</span>CancelButton
            <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qwizard.html">QWizard</a></span><span class="operator">::</span>NextButton <span class="operator"><</span><span class="operator"><</span> <span class="type"><a href="qwizard.html">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]$$$setButtonTextWizardButtonconstQString& -->
<h3 class="fn"><a name="setButtonText"></a><span class="type">void</span> QWizard::<span class="name">setButtonText</span> ( <span class="type"><a href="qwizard.html#WizardButton-enum">WizardButton</a></span> <i>which</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <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 Mac OS X, the <b>Next</b> button is called <b>Continue</b>.</p>
<p>To add extra buttons to the wizard (e.g., 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"><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>
<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="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="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>
<p><b>See also </b><a href="qwizardpage.html#registerField">QWizardPage::registerField</a>().</p>
<!-- @@@setDefaultProperty -->
<!-- $$$setField[overload1]$$$setFieldconstQString&constQVariant& -->
<h3 class="fn"><a name="setField"></a><span class="type">void</span> QWizard::<span class="name">setField</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>name</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> & <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]$$$setOptionWizardOptionbool -->
<h3 class="fn"><a name="setOption"></a><span class="type">void</span> QWizard::<span class="name">setOption</span> ( <span class="type"><a href="qwizard.html#WizardOption-enum">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="qwizard.html#options-prop">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"><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]$$$setPixmapWizardPixmapconstQPixmap& -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> QWizard::<span class="name">setPixmap</span> ( <span class="type"><a href="qwizard.html#WizardPixmap-enum">WizardPixmap</a></span> <i>which</i>, const <span class="type"><a href="qpixmap.html">QPixmap</a></span> & <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"><a name="setSideWidget"></a><span class="type">void</span> QWizard::<span class="name">setSideWidget</span> ( <span class="type"><a href="qwidget.html">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"><a name="setVisible"></a><span class="type">void</span> QWizard::<span class="name">setVisible</span> ( <span class="type">bool</span> <i>visible</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#visible-prop">QWidget::setVisible</a>().</p>
<!-- @@@setVisible -->
<!-- $$$sideWidget[overload1]$$$sideWidget -->
<h3 class="fn"><a name="sideWidget"></a><span class="type"><a href="qwidget.html">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"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QWizard::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$testOption[overload1]$$$testOptionWizardOption -->
<h3 class="fn"><a name="testOption"></a><span class="type">bool</span> QWizard::<span class="name">testOption</span> ( <span class="type"><a href="qwizard.html#WizardOption-enum">WizardOption</a></span> <i>option</i> ) const</h3>
<p>Returns true if the given <i>option</i> is enabled; otherwise, returns false.</p>
<p><b>See also </b><a href="qwizard.html#options-prop">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"><a name="validateCurrentPage"></a><span class="type">bool</span> QWizard::<span class="name">validateCurrentPage</span> ()<tt> [virtual]</tt></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 true, 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"><a name="visitedPages"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type">int</span>> 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 "unvisited" again.</p>
<p><b>See also </b><a href="qwizard.html#hasVisitedPage">hasVisitedPage</a>().</p>
<!-- @@@visitedPages -->
<!-- $$$winEvent[overload1]$$$winEventMSG*long* -->
<h3 class="fn"><a name="winEvent"></a><span class="type">bool</span> QWizard::<span class="name">winEvent</span> ( <span class="type">MSG</span> * <i>message</i>, <span class="type">long</span> * <i>result</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#winEvent">QWidget::winEvent</a>().</p>
<!-- @@@winEvent -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
 
     |