Progress bars are useful indicators of the status of a background task, showing an incrementally filled portion of the bar relative to the progress. They are frequently used in long-running operations, so it is common to connect them with the threads that execute these tasks to provide visual feedback to end users.
Connecting threads with a progress bar
Getting ready
Our sample application will consist of a horizontal progress bar that will increment a fixed amount of progress once the user clicks on the Start button:
![](https://static.packt-cdn.com/products/9781788622301/graphics/assets/39ccaa8f-15d9-4d73-bfc0-e0be22d147d2.png)
How to do it...
To simulate the execution of a background...