[Qt-interest] text dimensions ?
Martin Schröer
gordon at gordonswelt.de
Tue Mar 17 15:50:30 CET 2009
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
More information about the Qt-interest-old
mailing list