Bounding rect question

Christoph Feck christoph at maxiom.de
Mon Jul 8 17:19:47 UTC 2013


On Monday 08 July 2013 18:53:02 Leonardo Giordani wrote:
> tmpRect = fm.boundingRect(rect, flags, text);
> 
> which extracts the bounding rect of the given text written using
> the given font. I do not understand why the function requires a
> QRect as input.

The result is a QRect, not a QSize, so the function somehow needs to 
know the position. Additionally, you can use 'flags' to request 
centering, and thus it needs to know the box where to center in.

-- 
Christoph Feck
http://kdepepo.wordpress.com/
KDE Quality Team


More information about the Plasma-devel mailing list