[PyQt] textedit example
hpj at urpla.net
Mon Nov 29 11:47:37 GMT 2010
On Thursday 04 November 2010, 23:42:33 Hans-Peter Jansen wrote:
> 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 tables.
> 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).
wouldn't that fit perfectly in examples/richtext? (it derived from
More information about the PyQt