[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Paragraphing a QString
From:       Lars Knoll <lars () trolltech ! com>
Date:       2004-04-09 9:30:55
Message-ID: 200404091130.56444.lars () trolltech ! com
[Download RAW message or body]

On Friday 09 April 2004 10:20, Ken Deeter wrote:
> > The only thing I know that might work is KWordWrap:
> > http://api.kde.org/cvs-api/kdeui/html/classKWordWrap.html
>
> I might add. KWordWrap will work well for western languages (with spaces)
> but will not do the right thing for other languages. This is a general
> KDE-wide problem that we really need something at the libs level (or qt
> level) to address. (Pango provides this functionality for gtk)
>
> You can also take a look at kdelibs/khtml/rendering/break_lines.h for a
> more complicated way of figuring out where to break lines but I get the
> feeling this is more info than you care to know about.

Qt has some stuff in it's QTextLayout class (see 
QTDIR/src/kernel/qtextlayout*). It's not part of the public API in Qt3 
(mainly because it'll undergo some changes going to Qt4), but the API will 
stay stable (and binary compatible) within Qt3. A usage example can be found 
in qpainter.cpp:qt_format_text even though this might be quite a bit more 
complicated than what you need.

For Qt 4, I am currently working on a public API for text layouting.

Cheers,
Lars
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic