[Qt] qtwinapi DrawText regression ?

Paul Ishenin ip at kmiac.ru
Tue Jul 17 03:46:09 CEST 2007


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.

Best regards,
Paul Ishenin.




More information about the Qt mailing list