Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, August 2006
Re: Measuring the size of text


Message 1 in thread

I do have a QPainter object at hand so this function is even more 
convenient for me. Thanks again for both the methods.

Raghavendra

Nathan Carter wrote:
> If you happen to already have a particular QPainter object to use, then it's
> even easier.
>     http://doc.trolltech.com/4.2/qpainter.html#boundingRect
>     http://doc.trolltech.com/3.3/qpainter.html#boundingRect
>
>
> On 7/31/06 12:19 PM, "Scott Aron Bloom" <scott@xxxxxxxxxxxx> wrote:
>
>   
>> I don't remember the exact functions, look in the docs for QFont and I
>> think its QFontMetrics
>>
>>     
>>> -----Original Message-----
>>> From: Raghavendra Chandrashekara [mailto:rc3@xxxxxxxxxxxx]
>>> Sent: Monday, July 31, 2006 9:13 AM
>>> To: qt-interest@xxxxxxxxxxxxx
>>> Subject: Measuring the size of text
>>>
>>> Hello Everybody,
>>>
>>> Is there a way of measuring the size in pixels that a given piece of
>>> text will take when drawn with drawText() method of the QPainter
>>> class?
>>>       
>
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>   

--
 [ signature omitted ]