Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QStyleOptionProgressBar Class Reference

The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar. More...

    #include <QStyleOptionProgressBar>

Inherits QStyleOption.

- List of all members, including inherited members

### Public Types

- enum ProgressBarFeature { None, CenterIndicator, PercentageVisible, IndicatorFollowsStyle }
- typedef ProgressBarFeatures

### Read-Only Properties

- features : ProgressBarFeatures
- progress : int
- progressString : QString
- totalSteps : int

- 5 read-only properties inherited from QStyleOption

### Public Functions

- QStyleOptionProgressBar ()

- 1 public function inherited from QStyleOption

## Detailed Description

The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.

The QStyleOptionProgressBar class is used to draw QProgressBar.

## Member Type Documentation

### enum QStyleOptionProgressBar::ProgressBarFeature
typedef QStyleOptionProgressBar::ProgressBarFeatures

This describes features for a progress bar.

`QStyleOptionProgressBar::None` | Indicates a normal progress bar.
`QStyleOptionProgressBar::CenterIndicator` | Indicates that the percentage indicator progressBarString should be centered.
`QStyleOptionProgressBar::PercentageVisible` | Indicates that the progressBarString should also be drawn.
`QStyleOptionProgressBar::IndicatorFollowsStyle` | Indicates that the progressBarString should follow the style.

The ProgressBarFeatures typedef can store a combination of ProgressBarFeature values.

See also features, QProgressBar::indicatorFollowsStyle, and QProgressBar::centerIndicator.

## Property Documentation

### features : ProgressBarFeatures

This property holds describes the features of the progress bar.

This variable is a bitwise OR of the features of the progress bar.

See also ProgressBarFeature.

### progress : int

This property holds the current progress for the progress bar.

The current progress. A value of -1 indicates that the progress hasn't started yet.

### progressString : QString

This property holds the progress of the progress bar as a string.

This is the progress expressed as a string. An empty string indicates that the progress bar hasn't started yet.

See also QProgressBar::progressString.

### totalSteps : int

This property holds the total steps for the progress bar.

The total number of steps for the progress bar. A totalSteps of 0 indicates that a busy indicator should be drawn instead of a standard progress bar.

See also QProgressBar::totalSteps.

## Member Function Documentation

### QStyleOptionProgressBar::QStyleOptionProgressBar ()

Constructs a QStyleOptionProgressBar. The members variables are initialized to default values.