QWizard(3qt)
๐ NAME ๐
QWizard โ framework for wizard dialogs. that's it, that's the whole job description bestie ๐งโจ
๐ฆ SYNOPSIS ๐ฆ
#include <qwizard.h>
Inherits QDialog. (yes she's a dialog girlie, she got it from her mama ๐
)
โจ Public Members โจ
QWizard ( QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )~QWizard ()virtual void addPage ( QWidget * page, const QString & title )virtual void insertPage ( QWidget * page, const QString & title, int index )virtual void removePage ( QWidget * page )QString title ( QWidget * page ) constvoid setTitle ( QWidget * page, const QString & title )QFont titleFont () constvoid setTitleFont ( const QFont & )virtual void showPage ( QWidget * page )QWidget * currentPage () constQWidget * page ( int index ) constint pageCount () constint indexOf ( QWidget * page ) constvirtual bool appropriate ( QWidget * page ) constvirtual void setAppropriate ( QWidget * page, bool appropriate )QPushButton * backButton () constQPushButton * nextButton () constQPushButton * finishButton () constQPushButton * cancelButton () constQPushButton * helpButton () const
๐ Public Slots ๐
virtual void setBackEnabled ( QWidget * page, bool enable )virtual void setNextEnabled ( QWidget * page, bool enable )virtual void setFinishEnabled ( QWidget * page, bool enable )virtual void setHelpEnabled ( QWidget * page, bool enable )virtual void setFinish ( QWidget *, bool )(obsolete ๐ต โ more on that below)
๐ฅ Signals ๐ฅ
void helpClicked ()void selected ( const QString & )
๐ธ Properties ๐ธ
QFont titleFontโ the font used for page titles
๐ซถ Protected Members ๐ซถ
virtual void layOutButtonRow ( QHBoxLayout * layout )virtual void layOutTitleRow ( QHBoxLayout * layout, const QString & title )
โญ Protected Slots โญ
virtual void back ()virtual void next ()virtual void help ()
๐ DESCRIPTION ๐
The QWizard class provides a framework for wizard dialogs. periodt.
A wizard is a special type of input dialog that consists of a sequence of dialog pages. A wizard's purpose is to walk the user through a process step by step. Wizards are useful for complex or infrequently occurring tasks that people may find difficult to learn or do. like, imagine making someone rawdog their first-ever network config with zero guidanceโฆ no. we hold their hand, we walk them through it, we slay. ๐
QWizard provides page titles and displays Next, Back, Finish, Cancel, and Help push buttons, as appropriate to the current position in the page sequence. These buttons can be enabled/disabled using setBackEnabled(), setNextEnabled(), setFinishEnabled() and setHelpEnabled(). you got the remote control bestie, use it.
Create and populate dialog pages that inherit from QWidget and add them to the wizard using addPage(). Use insertPage() to add a dialog page at a certain position in the page sequence. Use removePage() to remove a page from the page sequence. so it's giving โจmodularโจ.
Use currentPage() to retrieve a pointer to the currently displayed page. page() returns a pointer to the page at a certain position in the page sequence.
Use pageCount() to retrieve the total number of pages in the page sequence. indexOf() will return the index of a page in the page sequence. counting is self-care fr fr ๐ข
QWizard provides functionality to mark pages as appropriate (or not) in the current context with setAppropriate(). The idea is that a page may be irrelevant and should be skipped depending on the data entered by the user on a preceding page. the way that she reads the room before showing you a pageโฆ main character energy honestly.
It is generally considered good design to provide a greater number of simple pages with fewer choices rather than a smaller number of complex pages. tiny pages, big brain ๐ง ๐
Example code is available here: wizard/wizard.cpp wizard/wizard.h
๐ผ๏ธ [Image Omitted] โ and the caption under it said: "A QWizard page" โจ
See also Abstract Widget Classes, Dialog Classes, and Organizers.
๐ MEMBER FUNCTION DOCUMENTATION ๐
QWizard::QWizard ( QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )
Constructs an empty wizard dialog. The parent, name, modal and f arguments are passed to the QDialog constructor. a blank canvas, an empty group chat, a fresh start ๐ธ
QWizard::~QWizard ()
Destroys the object and frees any allocated resources, including all pages and controllers. she's leaving, and she's taking everything with her ๐
void QWizard::addPage ( QWidget * page, const QString & title ) [virtual]
Adds page to the end of the page sequence, with the title, title. queue up at the back babe ๐๏ธ
bool QWizard::appropriate ( QWidget * page ) const [virtual]
Called when the Next button is clicked; this virtual function returns TRUE if page is relevant for display in the current context; otherwise it is ignored by QWizard and returns FALSE. The default implementation returns the value set using setAppropriate(). The ultimate default is TRUE.
โ ๏ธ Warning: The last page of the wizard will be displayed if no page is relevant in the current context. like, someone's gotta show up to the party bestie ๐ญ
void QWizard::back () [virtual protected slot]
Called when the user clicks the Back button; this function shows the preceding relevant page in the sequence. taking it back, respectfully ๐ซ
See also appropriate().
QPushButton * QWizard::backButton () const
Returns a pointer to the dialog's Back button.
By default, this button is connected to the back() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setBackEnabled() to enable/disable this button.
QPushButton * QWizard::cancelButton () const
Returns a pointer to the dialog's Cancel button.
By default, this button is connected to the QDialog::reject() slot, which is virtual so you can reimplement it in a QWizard subclass. ngl sometimes the healthiest option is walking out ๐ช
QWidget * QWizard::currentPage () const
Returns a pointer to the current page in the sequence. Although the wizard does its best to make sure that this value is never 0, it can be if you try hard enough. she's doing her best okay ๐
QPushButton * QWizard::finishButton () const
Returns a pointer to the dialog's Finish button.
By default, this button is connected to the QDialog::accept() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setFinishEnabled() to enable/disable this button.
void QWizard::help () [virtual protected slot]
Called when the user clicks the Help button, this function emits the helpClicked() signal. screaming for assistance, but make it classy ๐ฃ
QPushButton * QWizard::helpButton () const
Returns a pointer to the dialog's Help button.
By default, this button is connected to the help() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setHelpEnabled() to enable/disable this button.
void QWizard::helpClicked () [signal]
This signal is emitted when the user clicks on the Help button. ๐โจ
int QWizard::indexOf ( QWidget * page ) const
Returns the position of page page. If the page is not part of the wizard -1 is returned. she's not on the guest list, -1, blocked ๐ซ
void QWizard::insertPage ( QWidget * page, const QString & title, int index ) [virtual]
Inserts page at position index into the page sequence, with title title. If index is -1, the page will be appended to the end of the wizard's page sequence. line-cutting privileges, iconic ๐
void QWizard::layOutButtonRow ( QHBoxLayout * layout ) [virtual protected]
This virtual function is responsible for adding the buttons below the bottom divider.
layout is the horizontal layout of the entire wizard.
void QWizard::layOutTitleRow ( QHBoxLayout * layout, const QString & title ) [virtual protected]
This virtual function is responsible for laying out the title row.
layout is the horizontal layout for the wizard, and title is the title for this page. This function is called every time title changes. every single time, she's watching ๐
void QWizard::next () [virtual protected slot]
Called when the user clicks the Next button, this function shows the next relevant page in the sequence. onward, upward, forward ๐
See also appropriate().
QPushButton * QWizard::nextButton () const
Returns a pointer to the dialog's Next button.
By default, this button is connected to the next() slot, which is virtual so you can reimplement it in a QWizard subclass. Use setNextEnabled() to enable/disable this button.
QWidget * QWizard::page ( int index ) const
Returns a pointer to the page at position index in the sequence, or 0 if index is out of range. The first page has index 0. zero-indexed bestie, we don't start at one around here ๐
int QWizard::pageCount () const
Returns the number of pages in the wizard. math but make it cute ๐งฎ
void QWizard::removePage ( QWidget * page ) [virtual]
Removes page from the page sequence but does not delete the page. If page is currently being displayed, QWizard will display the page that precedes it, or the first page if this was the first page. ghosted from the sequence but still alive, love that for her ๐ป
void QWizard::selected ( const QString & ) [signal]
This signal is emitted when the current page changes. The parameter contains the title of the selected page. new page, who dis ๐
void QWizard::setAppropriate ( QWidget * page, bool appropriate ) [virtual]
If appropriate is TRUE then page page is considered relevant in the current context and should be displayed in the page sequence; otherwise page should not be displayed in the page sequence. vibe check passed or failed, no in-between ๐ฏ
See also appropriate().
void QWizard::setBackEnabled ( QWidget * page, bool enable ) [virtual slot]
If enable is TRUE, page page has a Back button; otherwise page has no Back button. By default all pages have this button.
void QWizard::setFinish ( QWidget *, bool ) [virtual slot]
This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.
Use setFinishEnabled instead. like, she's a legend but she's retired, let her rest ๐โจ
void QWizard::setFinishEnabled ( QWidget * page, bool enable ) [virtual slot]
If enable is TRUE, page page has a Finish button; otherwise page has no Finish button. By default no page has this button. so if you want a Finish button you gotta ASK, she's not handing them out for free ๐
void QWizard::setHelpEnabled ( QWidget * page, bool enable ) [virtual slot]
If enable is TRUE, page page has a Help button; otherwise page has no Help button. By default all pages have this button.
void QWizard::setNextEnabled ( QWidget * page, bool enable ) [virtual slot]
If enable is TRUE, page page has a Next button; otherwise the Next button on page is disabled. By default all pages have this button.
void QWizard::setTitle ( QWidget * page, const QString & title )
Sets the title for page page to title. name her. give her a name. ๐
void QWizard::setTitleFont ( const QFont & )
Sets the font used for page titles. See the "titleFont" property for details.
void QWizard::showPage ( QWidget * page ) [virtual]
Makes page the current page and emits the selected() signal.
This virtual function is called whenever a different page is to be shown, including the first time the QWizard is shown. By reimplementing it (and calling QWizard::showPage()), you can prepare each page prior to it being shown.
Examples:
(the original just says "Examples:" here and drops the example code โ leaving it exactly as she left it, bestie ๐ซถ)
QString QWizard::title ( QWidget * page ) const
Returns the title of page page.
QFont QWizard::titleFont () const
Returns the font used for page titles. See the "titleFont" property for details.
๐ Property Documentation ๐
QFont titleFont
This property holds the font used for page titles.
The default is QApplication::font().
Set this property's value with setTitleFont() and get this property's value with titleFont(). she comes with a whole personality out of the box, no setup required ๐ธ
๐ SEE ALSO ๐
more lore incoming, don't go anywhere ๐
๐ COPYRIGHT ๐
Okay so legally we gotta say this part, bestie, and we're gonna say it with our whole chest:
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
That's the whole thing. The license file in the distribution is where the full tea lives โ go read it there, periodt. ๐
๐ซถ AUTHOR ๐ซถ
Generated automatically from the source code.
No human sat down and lovingly typed this out. A machine did it. It simply manifested. Respect the pipeline honestly. โจ
๐ BUGS ๐
Found a bug in Qt? ๐ญ Bestie, please report it exactly like they describe at:
http://doc.trolltech.com/bughowto.html
Good bug reports help them help you. Thank you. ๐ซถ (That's genuinely what it says and it's genuinely true โ a good bug report is main character energy, a vague one is just... a vibe.)
The definitive Qt documentation is in HTML format, and it lives at $QTDIR/doc/html. You can read it with Qt Assistant or in a plain old web browser. ๐
This man page? It's a convenience thing, for the people who just really prefer man pages. Which, valid. But heads up: this format is not officially supported by Trolltech. So if something here looks cursed, it's not the official word, iykyk. ๐
And if you spot actual errors in this manual page โ not vibes you dislike, actual errors โ report them to:
qt-bugs@trolltech.com
Please include the name of the manual page (qwizard.3qt) and the Qt version (3.3.8). Both. Don't make them guess, that's not the move. ๐ฅ
And that's a wrap on the whole page, bestie!! ๐ This one came from Trolltech AS, dated 2 February 2007, covering QWizard(3qt) โ and look at you, you read the entire thing, top to bottom, copyright section and all. Obsessed with that level of dedication, genuinely. Go build a wizard now. Slay. ๐๐
๐ฆ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 ยท QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 ยท QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms