The QProgressBar widget provides a horizontal progress bar.
.PP
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.
.PP
The progress bar uses the concept of \fIsteps\fR; 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().
.PP
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.
.PP
See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets.
.PP
.ce 1
.B "[Image Omitted]"
.PP
.ce 1
.B "[Image Omitted]"
.PP
See also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets.
The \fItotalSteps\fR 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.
.PP
The \fIparent\fR, \fIname\fR and widget flags, \fIf\fR, are passed to the QFrame::QFrame() constructor.
.PP
See also totalSteps and progress.
.SH "bool QProgressBar::centerIndicator () const"
Returns TRUE if the indicator string should be centered; otherwise returns FALSE. See the "centerIndicator" property for details.
Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. See the "indicatorFollowsStyle" property for details.
This method is called to generate the text displayed in the center (or in some styles, to the left) of the progress bar.
.PP
The \fIprogress\fR may be negative, indicating that the progress bar is in the "reset" state before any progress is set.
.PP
The default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the \fIprogress\fR and \fItotalSteps\fR. You can set the \fIindicator\fR text if you wish.
.PP
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.