[Qt-interest] Line Spacing options in Qt

Josiah Bryan jbryan at productiveconcepts.com
Mon May 24 19:42:59 CEST 2010


Josh wrote:
> Hello all,
> 
> Would anyone be interested in me posting some code to add line spacing 
> options to Qt? I'll explain.
> 
> I've written briefly a couple times on my attempt to add line spacing 
> options to Qt (fixed spacing, proportional, etc., as in modern word 
> processors). I submitted a patch to Qt, but it was rejected as being out 
> of scope. So I went back to the drawing board to figure out if it would be 
> feasible to subclass QAbstractTextDocumentLayout with all the features of 
> the standard text layout, plus my additional feature. I was able to strip 
> the private QTextDocumentLayout class out of Qt, remove references to 
> private parts of the API, and got it to compile as a separate library. I 
> didn't think this would be possible, but it looks like it's working. The 
> question is whether this would be of interest to anyone? If so, I'd be 
> willing to clean it up a bit and put it online with some minimal 
> documentation. It's a little bit of a hack as it uses -qt-user-state to 
> pass in the line spacing options as I wanted to touch as little of Qt as 
> possible, and this was already in QTextBlock with css support.
> 

Line spacing? As in vertical spacing between lines? Count me in as one 
who's very much interested in it! I'd love to use your code for a 
project I'm working on myself.

Thanks for your hard work!
-Josiah


-- 

-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
jbryan at pciint.com
(765) 964-6009, ext. 224




More information about the Qt-interest-old mailing list