[PyKDE] more complex rich text / HTML

Paul Edgington edgington at ccdc.cam.ac.uk
Fri Oct 15 09:45:04 BST 2004

> I'm writing an app and want one of the widgets to look
> like a HTML display, with support for buttons, check
> boxes, different fonts, and hyperlinks.
> Qt's rich text browser isn't powerful enough.  It doesn't
> let me put controls in its qt rich text language nor
> even let me change the background color of parts of text.
> I played around with the idea of implementing a flow-based
> layout system myself and have something of a hack working,
> enough to figure out that the rest will take me at least
> another week.
> And probably another couple weeks or more if I want it to
> support font scaling, text selection, bidirectional text,
> stylesheets ... okay, more like a month or more.
> Does anyone have any suggestions?
> My crazy thought is to embed a native HTML widget for
> the different platforms, so that I use IE to display
> under MS Windows, Safari for Mac, and Konqueror for Linux.
> (That's all I need to support.)
> While the last is definitely possible, I can't find
> an example of embedding IE nor even a hint that this
> might be possible on Mac OS X.

might be one solution.

The latest Mac browser is based on khtml which is also the basis for
Konqueror. Someone started a port of khtml to windows
(http://khtml-win32.sourceforge.net/) but it unfortunately stalled.
There is also a python binding to khtml as part of the PyKDE project.

One option then would be to try and port khtml to pure Qt so it would
work on windows and then probably modify the khtml python wrapper to
match. Not only would it be a possible solution to your problem but
would make a lot of other people (include myself) happy as this is
exactly the sort of thing I may well need for a work project next year.

I suspect it is too large a project for what you need but no harm in
suggesting it!


More information about the PyQt mailing list