I wanted to remove the space that keeps the percentage number in QProgressDialog, when the prograss is indeterminate.
I wanted to remove the space that keeps the percentage number in QProgressDialog, when the prograss is indeterminate.
To remove the space, you can create a custom progress bar using QProgressBar widget, and set setTextVisible(False):
dialog = QProgressDialog('Progress', 'Cancel', 0, 0, parent)
bar = QProgressBar(dialog)
# Remove percentage text
bar.setTextVisible(False)
# Set Indeterminate
bar.setMinimum(0)
bar.setMaximum(0)
# Set progress bar component to dialog
dialog.setBar(bar)
# Show dialog
dialog.show()