maximum text width of interval
Hi,
I need to find out the maximum text width of an interval, lets say [-100.50, 100.50] with precision of two.
I can find out the text width using the QFontMetrics, but that works only for a sample string. I'd have to convert every number in the interval to a string and calculate the width for it to get the maximum. Is there an easier way?
Thanks!
Re: maximum text width of interval
What if you use [-888.88, 888.88] to calculate maximum string width (if I got you correctly)?
Re: maximum text width of interval
why -888.88 and 888.88 ? it's not sure that the 8 is the "widest" character, it depends on the currently used font.