PyQt5 QSpinBox – Checking if text is capitalize ?
In this article we will see how we can if the text of the spin box is capitalize or not, in order to set the font we use setFont method which takes QFont object as argument. In order to make the the text i.e font capitalize, we have to get the QFont object of the spin box then make it capitalize then reassign it to the spin box.
In order to do this we capitalization method with the QFont object of the spin box
Syntax : font.capitalization()
Argument : It takes no argument
Return : It returns binary value 0 if capitalization is not on and 1 when it is on
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. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course