PyQt5 QSpinBox – Getting the under line position
In this article we will see how we can get under line position of the spin box’s text. Under line position is the distance from the base line to where an under line should be drawn. An underline, also called an underscore, is a more or less horizontal line immediately below a portion of writing. Single and occasionally double underlining is used in hand-written or typewritten documents as a way to emphasize key text.
In order to do this we use
strikeOutPos method with the spin box’s QFontMetrics object.
Syntax : font_metrics.underlinePos()
Argument : It takes no argument
Return : It returns integer.
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