|  | Home · Overviews · Examples |

# QProgressBar Class Reference
[com.trolltech.qt.gui module]

The `QProgressBar` widget provides a horizontal or vertical progress bar. More...

Inherits `QWidget`.

## Detailed Description

The `QProgressBar` widget provides a horizontal or vertical progress bar.

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.

The progress bar uses the concept of steps. You set it up by specifying the minimum and maximum possible step values, and it will display the percentage of steps that have been completed when you later give it the current step value. The percentage is calculated by dividing the progress (`value` - `minimum`) divided by `maximum` - `minimum`.

You can specify the minimum and maximum number of steps with `setMinimum` and `setMaximum`. The current number of steps is set with `setValue`. The progress bar can be rewound to the beginning with `reset`.

If minimum and maximum both are set to 0, the 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.

| A progress bar shown in the Macintosh widget style.
| A progress bar shown in the Windows XP widget style.
| A progress bar shown in the Plastique widget style.

See also `QTimeLine`, `QProgressDialog`, and GUI Design Handbook: Progress Indicator.