enthought / traitsui

TraitsUI: Traits-capable windowing framework
http://docs.enthought.com/traitsui
Other
295 stars 95 forks source link

Allow HTMLEditor to work with limited functionality when Qt WebKit/WebEngine is not available #1463

Open kitchoi opened 3 years ago

kitchoi commented 3 years ago

Similar motivation to #1462: Qt WebKit is deprecated and its replacement WebEngine is nontrivial to build (sometimes not available).

However different from #1462, this issue is concerned about making it easy to display rich text in HTML even when WebKit/WebEngine is not available in a Qt environment. This is motivated by the observation that Qt Widgets that use QTextDocument, such as QTextEdit, are capable of displaying rich text with a subset of HTML4 markup (see https://doc.qt.io/qt-5/richtext-html-subset.html). Furthermore, the wx implementation of HTMLEditor also has limited capability in HTML rendering.

The title of this issue has assumed a specific implementation: Make this a fallback option part of HTMLEditor. However, different implementation, e.g. having a separate editor (factory) altogether may also be considered and can be discussed.

corranwebster commented 3 years ago

The QTextBrowser widget would seem to be the right thing to use here.