- Extending Qt Creator Manual
- QtCreator
- FutureProgress
- Extending Qt Creator Manual 8.0.2

# FutureProgress Class

class Core::FutureProgress

The FutureProgress class is used to adapt the appearance of progress indicators that were created through the ProgressManager class. More...

Header: | #include <coreplugin/progressmanager/futureprogress.h>

- List of all members, including inherited members

## Public Functions

QFuture<void> | future() const
bool | hasError() const
void | setTitle(const QString &title)
void | setWidget(QWidget *widget)
QString | title() const
QWidget * | widget() const

## Signals

void | canceled()
void | clicked()
void | finished()

## Detailed Description

Use the instance of this class that was returned by ProgressManager::addTask() to define a widget that should be shown below the progress bar, or to change the progress title. Also use it to react on the event that the user clicks on the progress indicator (which can be used to e.g. open a more detailed view, or the results of the task).

## Member Function Documentation

### `[signal]` void FutureProgress::canceled()

Connect to this signal to get informed when the operation is canceled.

### `[signal]` void FutureProgress::clicked()

Connect to this signal to get informed when the user clicks on the progress indicator.

### `[signal]` void FutureProgress::finished()

Another way to get informed when the task has finished.

### QFuture<void> FutureProgress::future() const

Returns a QFuture object that represents this running task.

### bool FutureProgress::hasError() const

Returns the error state of this progress indicator.

### void FutureProgress::setTitle(const QString &title)

Changes the title of the progress indicator.

See also title().

### void FutureProgress::setWidget(QWidget *widget)

Sets the widget to show below the progress bar. This will be destroyed when the progress indicator is destroyed. Default is to show no widget below the progress indicator.

See also widget().

### QString FutureProgress::title() const

Returns the title of the progress indicator.

See also setTitle().

### QWidget *FutureProgress::widget() const

Returns the custom widget that is shown below the progress indicator.

See also setWidget().