In this article we will see how we can get the family name of the font of spin box. The family name may optionally also include a foundry name, e.g. “Helvetica [Cronyx]”. If the family is available from more than one foundry and the foundry isn’t specified, an arbitrary foundry is chosen. If the family isn’t available a family will be set using the font matching algorithm. In order to set family name we use
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 family method with the QFontInfo object of the spin box
Syntax : font_info.family()
Argument : It takes no argument
Return : It returns string
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.