PyQt5 – How to change style and size of text Progress Bar ?
In this article we will see how to change the font style and the size of data which is inside the progress bar. We can set the text in progress bar using
setFormat method. In order to change the font and the size we will use
setFont method which take QFont object as argument and font and size will be changes.
Syntax : bar.setFont(QFont(font_name, size))
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
Argument : It takes QFont object as argument.
Action performed : This will change the font and size of the text.
Below is the implementation.