[Qt-interest] text dimensions ?

Jesús Fernández jsfdez at gmail.com
Tue Mar 17 15:53:04 CET 2009


Read this:

http://doc.trolltech.com/4.5/qfontmetrics.html

Regards

On Tue, Mar 17, 2009 at 3:50 PM, Martin Schröer <gordon at gordonswelt.de>wrote:

> Hi list.
>
> I have to drawText on a GraphicsScene.
> Does anybody know a good practice to do this, considering the [dynamic]
> size of the text given to be drawn ?
> I want to have the text fill a certain area in original scale, plus
> having it resize along with the whole scene,
> so e.g. it always fills the same region within the scene.
>
> Like giving a text 'rate this scene 'scary'', being always shown in the
> bottom right corner of the scene
> within a region that is scene.width() /4, scene.height() /4.
>
> I don't have troubles getting the size of a bounding rect for doing
> that, what gives me headaches is
> how to find out which size the text has or has to have, still being
> drawn in aspect when the scene
> dimensions changes.
>
> Any help, as always, highly appreciated.
>
> Martin
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/c5ecf2d6/attachment.html 


More information about the Qt-interest-old mailing list