[Qgis-developer] Re: Labels in OS X

John C. Tull john.tull at wildnevada.org
Tue Aug 5 13:02:45 EDT 2008


Tom and others,

This appears to have been a Qt issue (as I suspected). I installed Qt  
4.4.1 last night, and labels appear to be back in order. Thanks for  
your help and suggestions.

John

On Jul 12, 2008, at 10:56 PM, Tom Elwertowski wrote:

> John C. Tull wrote:
>> The labels show correctly in the Terminal, e.g.:
>> Debug: Label: "Fire Mountain"
>
> When the labels are displayed, is truncation always between letters  
> or do you see partial letters?
>
> Have you tried changing font, size, style, alignment and rotation?  
> Is the truncation different for any of these or do you see the same  
> partial string?
>
> Line 399 does the display:
> painter->drawText ( dx, dy, text );
>
> Try another qDebug() line just before it to see if the value of  
> 'text' has changed. I don't anywhere it could change however.
>
> A clipping rectangle is another possible culprit but I don't see one  
> in use. There is a drawText variant that uses a QRect rather then  
> two ints. When I saw your image, my suspicion was that a bad  
> clipping rect was being computed and passed to drawText.
>
> If changing the label properties doesn't produce any new oddities,  
> the only other thing I can think of is to look at the source for  
> drawText to see how it processes its parameters.
>
> Tom



More information about the Qgis-developer mailing list