[Qt] qtwinapi DrawText regression ?

zeljko zeljko at holobit.net
Tue Jul 17 08:23:59 CEST 2007


On Tuesday 17 July 2007 03:46, Paul Ishenin wrote:
> zeljko wrote:
> > Hi,
> >
> > There's a qtwinapi patch (r11520) which assigns Rect before exiting proc,
> > now all texts in eg. TStringGrid cells, DrawText() via Canvas are bottom
> > aligned, not centered. Is this normal  or just Rect := R shouldn't be
> > there  ?
>
> When DT_CALCRECT is used Rect should return rectangle that Text will
> occupy. I assumpted that Layout and Alignment flags should be taked into
> account while calculating rectangle, but no - only width and height must
> be added to original left and top.
>
> So, I changed a bit code and now it works fine.

tnx



More information about the Qt mailing list