In this article we will see how we can get size of the spin box’s font i.e text. In order to get the size object we have to get the QFontMetrics object of the size box to get the size. The size will be in pixels.
In order to do this we use size method with the spin box’s QFontMetrics object.
Syntax : font_metrics.size(0, text)
Argument : It takes two argument one is the integer value which refer to the flags for example 0 represent single line text and second is the spin box text.
Please Login to comment...