Home

QtWizard Class Reference

The QtWizard class provides a framework for wizards. More...

    #include <QtWizard>

Inherits QDialog.

Public Types

Properties

Public Functions

Public Slots

Signals

Protected Functions

Additional Inherited Members


Detailed Description

The QtWizard class provides a framework for wizards.

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.

QtWizard inherits QDialog and represents a wizard. Each page is a QtWizardPage (a QWidget subclass). To create your own wizards, you can use these classes directly, or you can subclass them for more control.

Topics:

A Trivial Example

The following example illustrates how to create wizard pages and add them to a wizard. For more advanced examples, see Class Wizard and License Wizard.

    QtWizardPage *createIntroPage()
    {
        QtWizardPage *page = new QtWizardPage;
        page->setTitle("Introduction");

        QLabel *label = new QLabel("This wizard will help you register your copy "
                                   "of Super Product Two.");
        label->setWordWrap(true);

        QVBoxLayout *layout = new QVBoxLayout;
        layout->addWidget(label);
        page->setLayout(layout);

        return page;
    }

    QtWizardPage *createRegistrationPage()
    {
        ...
    }

    QtWizardPage *createConclusionPage()
    {
        ...
    }

    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);

        QtWizard wizard;
        wizard.addPage(createIntroPage());
        wizard.addPage(createRegistrationPage());
        wizard.addPage(createConclusionPage());

        wizard.setWindowTitle("Trivial Wizard");
        wizard.show();

        return app.exec();
    }

Wizard Look and Feel

QtWizard supports three wizard looks:

You can explicitly set the look to use using setWizardStyle() (e.g., if you want the same look on all platforms).

ClassicStyleModernStyleMacStyle

In addition to the wizard style, there are several options that control the look and feel of the wizard. These can be set using setOption() or setOptions(). For example, HaveHelpButton makes QtWizard show a Help button along with the other wizard buttons.

You can even change the order of the wizard buttons to any arbitrary order using setButtonLayout(), and you can add up to three custom buttons (e.g., a Print button) to the button row. This is achieved by calling setButton() or setButtonText() with CustomButton1, CustomButton2, or CustomButton3 to set up the button, and by enabling the HaveCustomButton1, HaveCustomButton2, or HaveCustomButton3 options. Whenever the user clicks a custom button, customButtonClicked() is emitted. For example:

            wizard()->setButtonText(QtWizard::CustomButton1, tr("&Print"));
            wizard()->setOption(QtWizard::HaveCustomButton1, true);
            connect(wizard(), SIGNAL(customButtonClicked(int)),
                    this, SLOT(printButtonClicked()));

Elements of a Wizard Page

Wizards consist of a sequence of QtWizardPages. At any time, only one page is shown. A page has the following attributes:

The diagram belows showns how QtWizard renders these attributes, assuming they are all present and ModernStyle is used:

When a subTitle is set, QtWizard displays it in a header, in which case it also uses the BannerPixmap and the LogoPixmap to decorate the header. The WatermarkPixmap 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.

The page itself (the QtWizardPage widget) occupies the area between the header, the watermark, and the button row. Typically, the page is a QtWizardPage on which a QGridLayout is installed, with standard child widgets (QLabels, QLineEdits, etc.).

If the wizard's style is MacStyle, the page looks radically different:

The watermark, banner, and logo pixmaps are ignored by the MacStyle. If the BackgroundPixmap is set, it is used as the background for the wizard; otherwise, a default "assistant" image is used.

The title and subtitle are set by calling QtWizardPage::setTitle() and QtWizardPage::setSubTitle() on the individual pages. They may be plain text or HTML (see titleFormat and subTitleFormat). The pixmaps can be set globally for the entire wizard using setPixmap(), or on a per-page basis using QtWizardPage::setPixmap().

Registering and Using Fields

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, QtWizard supports a "field" mechanism that allows you to register a field (e.g., a QLineEdit) 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).

To register a field, call QtWizardPage::registerField() field. For example:

    ClassInfoPage::ClassInfoPage(QWidget *parent)
        : QtWizardPage(parent)
    {
        ...
        classNameLabel = new QLabel(tr("&Class name:"));
        classNameLineEdit = new QLineEdit;
        classNameLabel->setBuddy(classNameLineEdit);

        baseClassLabel = new QLabel(tr("B&ase class:"));
        baseClassLineEdit = new QLineEdit;
        baseClassLabel->setBuddy(baseClassLineEdit);

        qobjectMacroCheckBox = new QCheckBox(tr("Generate Q_OBJECT &macro"));

        registerField("className*", classNameLineEdit);
        registerField("baseClass", baseClassLineEdit);
        registerField("qobjectMacro", qobjectMacroCheckBox);
        ...
    }

The above code registers three fields, className, baseClass, and qobjectMacro, which are associated with three child widgets. The asterisk (*) next to className denotes a mandatory field.

The fields of any page are accessible from any other page. For example:

    void OutputFilesPage::initializePage()
    {
        QString className = field("className").toString();
        headerLineEdit->setText(className.toLower() + ".h");
        implementationLineEdit->setText(className.toLower() + ".cpp");
        outputDirLineEdit->setText(QDir::convertSeparators(QDir::tempPath()));
    }

Here, we call QtWizardPage::field() to access the contents of the className field (which was defined in the ClassInfoPage) and use it to initialize the OuputFilePage. The field's contents is returned as a QVariant.

When we create a field using QtWizardPage::registerField(), 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 QLineEdit, QCheckBox, and QComboBox, because QtWizard knows which properties to look for.

If an asterisk (*) is appended to the name when the property is registered, the field is a mandatory field. When a page has mandatory fields, the Next and/or Finish buttons are enabled only when all mandatory fields are filled.

To consider a field "filled", QtWizard simply checks that the field's current value doesn't equal the original value (the value it had when initializePage() was called). For QLineEdit, QtWizard also checks that hasAcceptableInput() returns true, to honor any validator or mask.

QtWizard's mandatory field mechanism is provided for convenience. An more powerful (but also more cumbersome) alternative is to reimplement QtWizardPage::isComplete() and to emit the QtWizardPage::completeChanged() signal whenever the page becomes complete or incomplete.

The enabled/disabled state of the Next and/or Finish buttons is one way to perform validation on the user input. Another way is to reimplement validateCurrentPage() (or QtWizardPage::validatePage()) 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.

Creating Linear Wizards

Most wizards have a linear structure, with page 1 followed by page 2 and so on until the last page. The Class Wizard example is such a wizard. With QtWizard, linear wizards are created by instantiating the QtWizardPages and inserting them using addPage(). By default, the pages are shown in the order in which they were added. For example:

    ClassWizard::ClassWizard(QWidget *parent)
        : QtWizard(parent)
    {
        addPage(new IntroPage);
        addPage(new ClassInfoPage);
        addPage(new CodeStylePage);
        addPage(new OutputFilesPage);
        addPage(new ConclusionPage);
        ...
    }

When a page is about to be shown, QtWizard calls initializePage() (which in turn calls QtWizardPage::initializePage()) 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 example above).

If the user presses Back, cleanupPage() is called (which in turn calls QtWizardPage::cleanupPage()). The default implementation resets the page's fields to their original values (the values they had before initializePage() was called). If you want the Back button to be non-destructive and keep the values entered by the user, simply enable the IndependentPages option.

Creating Non-Linear Wizards

Some wizards are more complex in that they allow different traversal paths based on the information provided by the user. The License Wizard example illustrates this. It provides five wizard pages; depending on which options are selected, the user can reach different pages.

In complex wizards, pages are identified by IDs. These IDs are typically defined using an enum. For example:

    class LicenseWizard : public QtWizard
    {
        ...
        enum { Page_Intro, Page_Evaluate, Page_Register, Page_Details,
               Page_Conclusion };
        ...
    };

The pages are inserted using setPage(), which takes an ID and a instance of QtWizardPage (or of a subclass):

    LicenseWizard::LicenseWizard(QWidget *parent)
        : QtWizard(parent)
    {
        setPage(Page_Intro, new IntroPage);
        setPage(Page_Evaluate, new EvaluatePage);
        setPage(Page_Register, new RegisterPage);
        setPage(Page_Details, new DetailsPage);
        setPage(Page_Conclusion, new ConclusionPage);
        ...
    }

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 QtWizardPage::nextId(). For example:

    int IntroPage::nextId() const
    {
        if (evaluateRadioButton->isChecked()) {
            return LicenseWizard::Page_Evaluate;
        } else {
            return LicenseWizard::Page_Register;
        }
    }

    int EvaluatePage::nextId() const
    {
        return LicenseWizard::Page_Conclusion;
    }

    int RegisterPage::nextId() const
    {
        if (upgradeKeyLineEdit->text().isEmpty()) {
            return LicenseWizard::Page_Details;
        } else {
            return LicenseWizard::Page_Conclusion;
        }
    }

    int DetailsPage::nextId() const
    {
        return LicenseWizard::Page_Conclusion;
    }

    int ConclusionPage::nextId() const
    {
        return -1;
    }

It would also be possible to put all the logic in one place, in a QtWizardPage::nextId() reimplementation. For example:

    int LicenseWizard::nextId() const
    {
        switch (currentId()) {
        case Page_Intro:
            if (field("intro.evaluate").toBool()) {
                return Page_Evaluate;
            } else {
                return Page_Register;
            }
        case Page_Evaluate:
            return Page_Conclusion;
        case Page_Register:
            if (field("register.upgradeKey").toString().isEmpty()) {
                return Page_Details;
            } else {
                return Page_Conclusion;
            }
        case Page_Details:
            return Page_Conclusion;
        case Page_Conclusion:
        default:
            return -1;
        }
    }

To start at another page than the page with the lowest ID, call setStartId().

To test whether a page has been visited or not, call hasVisitedPage(). For example:

    void ConclusionPage::initializePage()
    {
        QString licenseText;

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

See also QtWizardPage, Class Wizard Example, and License Wizard Example.


Member Type Documentation

enum QtWizard::WizardButton

This enum specifies the buttons in a wizard.

ConstantValueDescription
QtWizard::BackButton0The Back button (Go Back on Mac OS X)
QtWizard::NextButton1The Next button (Continue on Mac OS X)
QtWizard::FinishButton2The Finish button (Done on Mac OS X)
QtWizard::CancelButton3The Cancel button (see also NoCancelButton)
QtWizard::HelpButton4The Help button (see also HaveHelpButton)
QtWizard::CustomButton15The first user-defined button (see also HaveCustomButton1)
QtWizard::CustomButton26The second user-defined button (see also HaveCustomButton2)
QtWizard::CustomButton37The third user-defined button (see also HaveCustomButton3)

The following value is only useful when calling setButtonLayout():

ConstantValueDescription
QtWizard::Stretch8A horizontal stretch in the button layout

See also setButton(), setButtonText(), setButtonLayout(), and customButtonClicked().

enum QtWizard::WizardOption
flags QtWizard::WizardOptions

This enum specifies various options that affect the look and feel of a wizard.

ConstantValueDescription
QtWizard::IndependentPages0x00000001The pages are independent of each other (i.e., they don't derive values from each other).
QtWizard::IgnoreSubTitles0x00000002Don't show any subtitles, even if they are set.
QtWizard::ExtendedWatermarkPixmap0x00000004Extend any WatermarkPixmap all the way down to the window's edge.
QtWizard::NoDefaultButton0x00000008Don't make the Next or Finish button the dialog's default button.
QtWizard::NoBackButtonOnStartPage0x00000010Don't show the Back button on the start page.
QtWizard::NoBackButtonOnLastPage0x00000020Don't show the Back button on the last page.
QtWizard::DisabledBackButtonOnLastPage0x00000040Disable the Back button on the last page.
QtWizard::HaveNextButtonOnLastPage0x00000080Show the (disabled) Next button on the last page.
QtWizard::HaveFinishButtonOnEarlyPages0x00000100Show the (disabled) Finish button on non-final pages.
QtWizard::NoCancelButton0x00000200Don't show the Cancel button.
QtWizard::CancelButtonOnLeft0x00000400Put the Cancel button on the left of Back (rather than on the right of Finish or Next).
QtWizard::HaveHelpButton0x00000800Show the Help button.
QtWizard::HelpButtonOnRight0x00001000Put the Help button on the far right of the button layout (rather than on the far left).
QtWizard::HaveCustomButton10x00002000Show the first user-defined button (CustomButton1).
QtWizard::HaveCustomButton20x00004000Show the second user-defined button (CustomButton2).
QtWizard::HaveCustomButton30x00008000Show the third user-defined button (CustomButton3).

The WizardOptions type is a typedef for QFlags<WizardOption>. It stores an OR combination of WizardOption values.

See also setOptions(), setOption(), and testOption().

enum QtWizard::WizardPixmap

This enum specifies the pixmaps that can be associated with a page.

ConstantValueDescription
QtWizard::WatermarkPixmap0The tall pixmap on the left side of a ClassicStyle or ModernStyle page
QtWizard::LogoPixmap1The small pixmap on the right side of a ClassicStyle or ModernStyle page header
QtWizard::BannerPixmap2The pixmap that occupies the background of a ModernStyle page header
QtWizard::BackgroundPixmap3The pixmap that occupies the background of a MacStyle wizard

See also setPixmap(), QtWizardPage::setPixmap(), and Elements of a Wizard Page.

enum QtWizard::WizardStyle

This enum specifies the different looks supported by QtWizard.

ConstantValueDescription
QtWizard::ClassicStyle0Classic Windows look (default on X11 and Qtopia)
QtWizard::ModernStyle1Modern Windows look (default on Windows)
QtWizard::MacStyle2Mac OS X look (default on Mac OS X)

See also setWizardStyle(), WizardOption, and Wizard Look and Feel.


Property Documentation

currentId : const int

This property holds the ID of the current page.

This property cannot be set directly. To change the current page, call next(), back(), or restart().

Access functions:

See also currentIdChanged() and currentPage().

options : WizardOptions

This property holds the various options that affect the look and feel of the wizard.

By default, the following options are set (depending on the platform):

Access functions:

See also wizardStyle.

startId : int

This property holds the ID of the first page.

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.

Access functions:

See also restart() and nextId().

subTitleFormat : Qt::TextFormat

This property holds the text format used by page subtitles.

The default format is Qt::AutoText.

Access functions:

See also QtWizardPage::title and titleFormat.

titleFormat : Qt::TextFormat

This property holds the text format used by page titles.

The default format is Qt::AutoText.

Access functions:

See also QtWizardPage::title and subTitleFormat.

wizardStyle : WizardStyle

This property holds the look and feel of the wizard.

By default, QtWizard uses the ClassicStyle on X11 and QWS (Qtopia Core), the ModernStyle on Windows, and the MacStyle on Mac OS X.

Access functions:

See also Wizard Look and Feel and options.


Member Function Documentation

QtWizard::QtWizard ( QWidget * parent = 0, Qt::WindowFlags flags = 0 )

Constructs a wizard with the given parent and window flags.

See also parent() and windowFlags().

QtWizard::~QtWizard ()

Destroys the wizard and its pages, releasing any allocated resources.

int QtWizard::addPage ( QtWizardPage * page )

Adds the given page to the wizard, and returns the page's ID.

The ID is guaranteed to be larger than any other ID in the QtWizard so far.

See also setPage() and page().

void QtWizard::back ()   [slot]

Goes back to the previous page.

This is equivalent to pressing the Back button.

See also next(), accept(), reject(), and restart().

QAbstractButton * QtWizard::button ( WizardButton which ) const

Returns the button corresponding to role which.

See also setButton() and setButtonText().

QString QtWizard::buttonText ( WizardButton which ) const

Returns the text on button which.

By default, the text on buttons depends on the wizardStyle. For example, on Mac OS X, the Next button is called Continue.

See also setButtonText(), button(), and setButton().

void QtWizard::cleanupPage ( int id )   [virtual protected]

This virtual function is called by QtWizard when the user clicks Back (unless the QtWizard::IndependentPages option is set).

The default implementation calls QtWizardPage::cleanupPage() on page(id).

See also QtWizardPage::cleanupPage() and initializePage().

void QtWizard::currentIdChanged ( int id )   [signal]

This signal is emitted when the current page changes, with the new current id.

See also currentId() and currentPage().

QtWizardPage * QtWizard::currentPage () const

Returns a pointer to the current page, or 0 if there is no current page (e.g., before the wizard is shown).

This is equivalent to calling page(currentId()).

See also page(), currentId(), and restart().

void QtWizard::customButtonClicked ( int which )   [signal]

This signal is emitted when the user clicks a custom button. which can be CustomButton1, CustomButton2, or CustomButton3.

By default, no custom button is shown. Call setOption() with HaveCustomButton1, HaveCustomButton2, or HaveCustomButton3 to have one, and use setButtonText() or setButton() to configure it.

See also helpRequested().

QVariant QtWizard::field ( const QString & name ) const

Returns the value of the field called name.

This function can be used to access fields on any page of the wizard.

See also QtWizardPage::registerField(), QtWizardPage::field(), and setField().

bool QtWizard::hasVisitedPage ( int id ) const

Returns true if the page history contains page id; otherwise, returns false.

Pressing Back marks the current page as "unvisited" again.

See also visitedPages().

void QtWizard::helpRequested ()   [signal]

This signal is emitted when the user clicks the Help button.

By default, no Help button is shown. Call setOption(HaveHelpButton, true) to have one.

Example:

    LicenseWizard::LicenseWizard(QWidget *parent)
        : QtWizard(parent)
    {
        ...
        setOption(HaveHelpButton, true);
        connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
        ...
    }

    void LicenseWizard::showHelp()
    {
        static QString lastHelpMessage;

        QString message;

        switch (currentId()) {
        case Page_Intro:
            message = tr("The decision you make here will affect which page you "
                         "get to see next.");
            break;
        ...
        default:
            message = tr("This help is likely not to be of any help.");
        }

        QMessageBox::information(this, tr("License Wizard Help"), message);

    }

See also customButtonClicked().

void QtWizard::initializePage ( int id )   [virtual protected]

This virtual function is called by QtWizard to prepare page id just before it is shown. (However, if the QtWizard::IndependentPages option is set, this function is only called the first time the page is shown.)

By reimplementing this function, you can ensure that the page's fields are properly initialized based on fields from previous pages.

The default implementation calls QtWizardPage::initializePage() on page(id).

See also QtWizardPage::initializePage() and cleanupPage().

void QtWizard::next ()   [slot]

Advances to the next page.

This is equivalent to pressing the Next button.

See also nextId(), back(), accept(), reject(), and restart().

int QtWizard::nextId () const   [virtual protected]

This virtual function is called by QtWizard to find out which page to show when the user clicks the Next button.

The default implementation calls QtWizardPage::nextId() on the currentPage().

See also QtWizardPage::nextId() and currentPage().

QtWizardPage * QtWizard::page ( int id ) const

Returns the page with the given id, or 0 if there is no such page.

See also addPage() and setPage().

QPixmap QtWizard::pixmap ( WizardPixmap which ) const

Returns the pixmap set for role which.

By default, the only pixmap that is set is the BackgroundPixmap on Mac OS X.

See also setPixmap(), QtWizardPage::pixmap(), and Elements of a Wizard Page.

void QtWizard::restart ()   [slot]

Restarts the wizard at the start page.

See also startId().

void QtWizard::setButton ( WizardButton which, QAbstractButton * button )

Sets the button corresponding to role which to button.

To add extra buttons to the wizard (e.g., a Print button), one way is to call setButton() with CustomButton1 to CustomButton3, and make the buttons visible using the HaveCustomButton1 to HaveCustomButton3 options.

See also button(), setButtonText(), setButtonLayout(), and options.

void QtWizard::setButtonLayout ( const QList<WizardButton> & layout )

Sets the order in which buttons are displayed to layout, where layout is a list of WizardButtons.

The default layout depends on the options (e.g., whether HelpButtonOnRight) that are set. You can call this function if you need more control over the buttons' layout than what options already provides.

You can specify horizontal stretches in the layout using Stretch.

Example:

    MyWizard::MyWizard(QWidget *parent)
        : QtWizard(parent)
    {
        ...
        QList<QtWizard::WizardButton> layout;
        layout << QtWizard::Stretch << QtWizard::BackButton << QtWizard::CloseButton
               << QtWizard::NextButton << QtWizard::FinishButton;
        setButtonLayout(layout);
        ...
    }

See also setButton(), setButtonText(), and setOptions().

void QtWizard::setButtonText ( WizardButton which, const QString & text )

Sets the text on button which to be text.

By default, the text on buttons depends on the wizardStyle. For example, on Mac OS X, the Next button is called Continue.

To add extra buttons to the wizard (e.g., a Print button), one way is to call setButtonText() with CustomButton1, CustomButton2, or CustomButton3 to set their text, and make the buttons visible using the HaveCustomButton1, HaveCustomButton2, and/or HaveCustomButton3 options.

See also buttonText(), setButton(), button(), setButtonLayout(), and setOptions().

void QtWizard::setDefaultProperty ( const char * className, const char * property, const char * changedSignal )

Sets the default property for className to be property, and the associated change signal to be changedSignal.

The default property is used when an instance of className (or of one of its subclasses) is passed to QtWizardPage::registerField() and no property is specified.

QtWizard knows the most common Qt widgets. For these (or their subclasses), you don't need to specify a property or a changedSignal. The table below lists these widgets:

WidgetPropertyChange Notification Signal
QAbstractButtonbool checkedtoggled()
QAbstractSliderint valuevalueChanged()
QComboBoxint currentIndexcurrentIndexChanged()
QDateTimeEditQDateTime dateTimedateTimeChanged()
QLineEditQString texttextChanged()
QListWidgetint currentRowcurrentRowChanged()
QSpinBoxint valuevalueChanged()

See also QtWizardPage::registerField().

void QtWizard::setField ( const QString & name, const QVariant & value )

Sets the value of the field called name to value.

This function can be used to set fields on any page of the wizard.

See also QtWizardPage::registerField(), QtWizardPage::setField(), and field().

void QtWizard::setOption ( WizardOption option, bool on = true )

Sets the given option to be enabled if on is true; otherwise, clears the given option.

See also options, testOption(), and setWizardStyle().

void QtWizard::setPage ( int id, QtWizardPage * page )

Adds the given page to the wizard with the given id.

See also addPage() and page().

void QtWizard::setPixmap ( WizardPixmap which, const QPixmap & pixmap )

Sets the pixmap for role which to pixmap.

The pixmaps are used by QtWizard when displaying a page. Which pixmaps are actually used depend on the wizard style.

Pixmaps can also be set for a specific page using QtWizardPage::setPixmap().

See also pixmap(), QtWizardPage::setPixmap(), and Elements of a Wizard Page.

bool QtWizard::testOption ( WizardOption option ) const

Returns true if the given option is enabled; otherwise, returns false.

See also options, setOption(), and setWizardStyle().

bool QtWizard::validateCurrentPage ()   [virtual protected]

This virtual function is called by QtWizard when the user clicks Next or Finish 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.

The default implementation calls QtWizardPage::validatePage() on the currentPage().

When possible, it is usually better style to disable the Next or Finish button (by specifying mandatory fields or by reimplementing QtWizardPage::isComplete()) than to reimplement validateCurrentPage().

See also QtWizardPage::validatePage() and currentPage().

QList<int> QtWizard::visitedPages () const

Returns the list of visited pages, in the order in which they were visited.

Pressing Back marks the current page as "unvisited" again.

See also hasVisitedPage().


Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions