In this article we will see how we can set the style name of the spin box’s text. Style name is used when developer created a custom style and wanted to name it for its own use, making style name easier to understand.
Note : Properties like style() and weight() will be ignored for font matching, though they may be simulated afterwards if supported by the platform’s font engine.
In order to do this we use
setStyleName method with the QFont object of the spin box.
Syntax : font.setStyleName(name)
Argument : It takes string as argument
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