PyQt5 QSpinBox – Getting letter spacing
In this article we will see how we can get the letter spacing in the text of spin box, letter spacing is the distance(gap) in-between two consecutive letter. Spacing can be change by specifying the pixels or the percentage. In order to set the spacing we use
setLetterSpacing method with the QFont object of the spin box.
In order to do this we use
letterSpacing method with the QFont object of the spin box
Syntax : font.letterSpacing()
Argument : It takes no argument
Return : It returns floating value
Note : The returned value doesn’t tell if the value is in percent or in percentage
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