[Qt-interest] Text Layout woes

Jason H scorp1us at yahoo.com
Fri Sep 18 16:12:53 CEST 2009


Can I please 'bump' this. I've been on the IRC channel, QtCentre, and no one seems to know...
Thanks!




----- Original Message ----
From: Jason H <scorp1us at yahoo.com>
To: qt-interest at trolltech.com
Sent: Wednesday, September 16, 2009 11:57:00 PM
Subject: [Qt-interest] Text Layout woes

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?


      
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      



More information about the Qt-interest-old mailing list