[PyQt] textedit example

Hans-Peter Jansen hpj at urpla.net
Thu Nov 4 22:42:33 GMT 2010

Hi Phil et al.,

since I was "in the mood" last night, here's the textedit example for 
the collection. 

This is a simple richtext editor in about 26k code. I'm inclined to say, 
it's fullblown, but they did the easy parts only: no page header/footer 
setup, no interface for embedding images, nor one to create/edit 

On the bright side, it has 
 * the usual font chooser, sizes and attributes
 * alignment
 * a bunch of different list styles, 
 * a print preview 
in only about 600 LOC!

One notable inanity: while it saves documents in odt format by 
_default_, it cannot read this format back in! That's because an odf 
_reader_ is simply missing in Qt. Hence, you can save as odt, open it 
in oowriter (where the demo doc looks pretty nice) and save that in 
html format again. That one should be readable for textedit again 
(didn't test that, though). 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: textedit.tar.gz
Type: application/x-tgz
Size: 61334 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101105/57fa32f4/attachment-0001.bin>

More information about the PyQt mailing list