[Qt-interest] Text Layout woes
Jason H
scorp1us at yahoo.com
Thu Sep 17 05:57:00 CEST 2009
Hi I am tring to make an Affine Text Item for QGraphicsView.
First, I rendered a single line of text with addText in a QPainterPath. My goal was to render a paragraph of text. QPainterPath doesn't do that. (Issue#1)
Then I ditched that and just used drawText from QPainter. But I found there were pixel differences. Whereas the path version scales smoothly, the raw painter does not. (Issue #2)
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.
Issue #4, is that I can't just create a QPainter for my QPainterPath and do my operations on the painter, and get back a QPainterPath.
I just want a long line of affine text to be wrapped within a given rect. It seems that we must use QPainterPaths (because of issue #2) in the implementation.
So what is a boy to do?
More information about the Qt-interest-old
mailing list