In this article we will see how we can check if the text of the spin box is bold not, in order to set the font use setFont method which takes QFont object as argument. In order to make the the text i.e font bold we have to get the QFont object of the spin box then make it bold then reassign it to the spin box.
In order to get the information about the font we have to get the QFontInfo object of spin box which can be done using
In order to do this we bold method with the QFontInfo object of the spin box
Syntax : font_info.bold()
Argument : It takes no argument
Return : It returns bool
Below is the implementation
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.