To associate a progress bar with a thread and to update the progress bar interactively via the thread, use the following steps:
- Let's create an application based on the Dialog without Buttons template.
- Add QLabel and QProgressBar widgets to the form by dragging and dropping the Label and Progress Bar widgets onto the form.
- Set the text property of the Label widget to Downloading the file.
- Let the objectName property of the Progress Bar widget be the default, progressBar.
- Save the application as demoProgressBarThread.ui. The form will now appear as shown in the following screenshot:

The user interface created with Qt Designer ...