PyQt5 QSpinBox – Setting Style Hint
In this article we will see how we can set the style hint of the spin box text. Style hints are used by the font matching algorithm to find an appropriate default family if a selected font family is not available. There are many styles hints offered by the spin box like AnyStyle, SansSerif, Times etc.
In order to do this we use
setStyleHint method with the QFont object of the spin box.
Syntax : font.setStyleHint(style_hint, style_preference)
Argument : It takes style hint as argument and second argument is optional which is the prefrence
Return : It returns None
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