PDA

View Full Version : string height



agaf
23rd January 2007, 11:50
Is it possible to get the exact string height (pixels)?

I mean something like QFontMetrics::height() or QFontMetrics::boundingRect() but both height() and boundingRect() give some abstract height related to the current font (not to the particular string)

e8johan
24th January 2007, 09:21
I suppose that you can render your string to a pixmap and then look for the top and bottom pixels yourself. There is no Qt method for this.