QProgressBar(3qt)

๐Ÿ“ฆ version 3.3.8b, in fedora 43, fedora 44

๐Ÿ’– QProgressBar(3qt) ๐Ÿ’–

okay bestie, welcome to the QProgressBar(3qt) man page, aka the manual for the cutest little horizontal progress bar in all of Qt ๐ŸŽ€โœจ


โœจ NAME โœจ

QProgressBar โ€” Horizontal progress bar ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <qprogressbar.h>

Inherits QFrame. (yes she's a whole QFrame, she has RANGE ๐Ÿ’œ)

๐Ÿ‘‘ Public Members ๐Ÿ‘‘

QProgressBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0
    )
QProgressBar ( int totalSteps, QWidget * parent = 0, const char * name =
    0, WFlags f = 0 )
int totalSteps () const
int progress () const
const QString & progressString () const
void setCenterIndicator ( bool on )
bool centerIndicator () const
void setIndicatorFollowsStyle ( bool )
bool indicatorFollowsStyle () const
bool percentageVisible () const
void setPercentageVisible ( bool )

๐Ÿซถ Public Slots ๐Ÿซถ

void reset ()
virtual void setTotalSteps ( int totalSteps )
virtual void setProgress ( int progress )
void setProgress ( int progress, int totalSteps )

๐Ÿฆ‹ Properties ๐Ÿฆ‹

bool centerIndicator - whether the indicator string should be centered
bool indicatorFollowsStyle - whether the display of the indicator string
    should follow the GUI style
bool percentageVisible - whether the current progress value is displayed
int progress - the current amount of progress
QString progressString - the amount of progress as a string  (read only)
int totalSteps - the total number of steps

๐Ÿงš Protected Members ๐Ÿงš

virtual bool setIndicator ( QString & indicator, int progress, int
    totalSteps )

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

The QProgressBar widget provides a horizontal progress bar. periodt ๐Ÿ’…

A progress bar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running. it's giving "bestie I promise I'm working on it, don't close me" energy ๐Ÿ˜ญ๐Ÿซถ

The progress bar uses the concept of steps; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps in the constructor or later with setTotalSteps(). The current number of steps is set with setProgress(). The progress bar can be rewound to the beginning with reset(). slay, it literally rewinds itself ๐ŸŒˆ

If the total is given as 0 the progress bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QHttp to download items when they are unable to determine the size of the item being downloaded. iykyk ๐Ÿฆ‹

See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets.

[Image Omitted] ๐Ÿ‘€

[Image Omitted] ๐Ÿ‘€

See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets.


๐ŸŽ€ MEMBER FUNCTION DOCUMENTATION ๐ŸŽ€

QProgressBar::QProgressBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

Constructs a progress bar. ๐ŸŽ‰

The total number of steps is set to 100 by default. (a whole hundred, generous queen ๐Ÿ‘‘)

The parent, name and widget flags, f, are passed on to the QFrame::QFrame() constructor.

See also totalSteps.


QProgressBar::QProgressBar ( int totalSteps, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

Constructs a progress bar. ๐ŸŽ‰

The totalSteps is the total number of steps that need to be completed for the operation which this progress bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0); call setProgress(50) after examining the last file. fr fr that's the whole flow ๐Ÿ’…

The parent, name and widget flags, f, are passed to the QFrame::QFrame() constructor.

See also totalSteps and progress.


bool QProgressBar::centerIndicator () const

Returns TRUE if the indicator string should be centered; otherwise returns FALSE. See the "centerIndicator" property for details. ๐Ÿ’–


bool QProgressBar::indicatorFollowsStyle () const

Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. See the "indicatorFollowsStyle" property for details. โœจ


bool QProgressBar::percentageVisible () const

Returns TRUE if the current progress value is displayed; otherwise returns FALSE. See the "percentageVisible" property for details. ๐Ÿ‘‘


int QProgressBar::progress () const

Returns the current amount of progress. See the "progress" property for details. ๐Ÿ“ˆ


const QString & QProgressBar::progressString () const

Returns the amount of progress as a string. See the "progressString" property for details. ๐Ÿ”ค


void QProgressBar::reset () [slot]

Reset the progress bar. The progress bar "rewinds" and shows no progress. back to square one bestie, no cap ๐ŸŒ€

Examples:

not me leaving this blank exactly like the original did ๐Ÿ™ˆ (the man page really just says Examples: and then... nothing. iconic.)

void QProgressBar::setCenterIndicator ( bool on )

Sets whether the indicator string should be centered to on. See the "centerIndicator" property for details. ๐Ÿ’ซ


bool QProgressBar::setIndicator ( QString & indicator, int progress, int totalSteps ) [virtual protected]

This method is called to generate the text displayed in the center (or in some styles, to the left) of the progress bar. ๐ŸŽฏ

The progress may be negative, indicating that the progress bar is in the "reset" state before any progress is set. โš ๏ธ

The default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the progress and totalSteps. You can set the indicator text if you wish.

To allow efficient repainting of the progress bar, this method should return FALSE if the string is unchanged from the last call to this function. don't be wasteful bestie, that's the rule ๐Ÿซถ


void QProgressBar::setIndicatorFollowsStyle ( bool )

Sets whether the display of the indicator string should follow the GUI style. See the "indicatorFollowsStyle" property for details. ๐ŸŒˆ


void QProgressBar::setPercentageVisible ( bool )

Sets whether the current progress value is displayed. See the "percentageVisible" property for details. ๐Ÿ‘€


void QProgressBar::setProgress ( int progress ) [virtual slot]

Sets the current amount of progress to progress. See the "progress" property for details. ๐Ÿ’…


void QProgressBar::setProgress ( int progress, int totalSteps ) [slot]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Sets the amount of progress to progress and the total number of steps to totalSteps.

See also totalSteps.


void QProgressBar::setTotalSteps ( int totalSteps ) [virtual slot]

Sets the total number of steps to totalSteps. See the "totalSteps" property for details. ๐Ÿ”ข


int QProgressBar::totalSteps () const

Returns the total number of steps. See the "totalSteps" property for details. ๐Ÿงฎ


๐Ÿ’– Property Documentation ๐Ÿ’–

bool centerIndicator

This property holds whether the indicator string should be centered.

Changing this property sets QProgressBar::indicatorFollowsStyle to FALSE. The default is TRUE. โš ๏ธ important lore

Set this property's value with setCenterIndicator() and get this property's value with centerIndicator().


bool indicatorFollowsStyle

This property holds whether the display of the indicator string should follow the GUI style.

The default is TRUE.

See also centerIndicator.

Set this property's value with setIndicatorFollowsStyle() and get this property's value with indicatorFollowsStyle().


bool percentageVisible

This property holds whether the current progress value is displayed.

The default is TRUE.

See also centerIndicator and indicatorFollowsStyle.

Set this property's value with setPercentageVisible() and get this property's value with percentageVisible().


int progress

This property holds the current amount of progress.

This property is -1 if progress counting has not started. ๐Ÿ’€ negative, as in "we haven't even begun"

Set this property's value with setProgress() and get this property's value with progress().


QString progressString

This property holds the amount of progress as a string.

This property is QString::null if progress counting has not started.

Get this property's value with progressString().


int totalSteps

This property holds the total number of steps.

If totalSteps is 0, the progress bar will display a busy indicator. ๐ŸŒ€

See also

(yep, that's literally just "See also" with nothing after it in the original. the man page left us on read ๐Ÿ˜ญ keeping it real though โ€” every detail stays, even the empty ones ๐Ÿ’…)

Set this property's value with setTotalSteps() and get this property's value with totalSteps().


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


โœ๏ธ AUTHOR โœ๏ธ

Generated automatically from the source code. (no human author, she was born from a script, main character energy fr ๐Ÿ’…โœจ)


๐Ÿ› BUGS ๐Ÿ›

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. ๐Ÿ™

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. โš ๏ธ

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qprogressbar.3qt) and the Qt version (3.3.8). ๐Ÿซถ


and that's the whole page bestie!! ๐ŸŽ€ this one came from Trolltech AS, dated 2 February 2007, and the manual name is QProgressBar(3qt) โ€” go forth and show your users exactly how much progress you've made, no cap ๐Ÿ‘‘๐Ÿ’–๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from