[Qt-interest] Text Layout woes
David Boddie
david.boddie at nokia.com
Fri Sep 18 17:54:16 CEST 2009
On Friday 18 September 2009 16:12:53, Jason H wrote:
> So then I figured I'd use QTextLayout, and I come to find that QTextLine
> doesn't actually give you the text that will fit. (Issue #3) If it did, I
> could use the line's coords and text with QPainterPath to make my
> paragraph.
There's example code distributed with Qt that shows how to use QTextLayout
and QTextLine to make text fit inside an area - take a look in the
doc/src/snippets/plaintextlayout directory.
There's also a Qt Quarterly article about this, too:
http://doc.trolltech.com/qq/qq24-textlayouts.html
The example code was even written in three languages:
http://doc.trolltech.com/qq/qq24-shapedtext.zip
David
--
David Boddie
Senior Technical Writer
Nokia, Qt Development Frameworks
More information about the Qt-interest-old
mailing list