[Development] Assistant WebKit/WebEngine support

Eike Ziller Eike.Ziller at qt.io
Wed Dec 18 08:07:17 CET 2019


Qt Creator 4.11 comes with an optional [[https://github.com/litehtml/litehtml][litehtml]] based help rendering backend. To change the used
backend, go to Options > Help > General, and choose "litehtml" as the "Viewer backend". All new help
viewers will use the changed backend, so e.g.  after Qt Creator restart, after "Open Link as New
Page", or after choosing "Reload" from the "split+" tool button menu on the right in the tool bar
above the viewer.

In our binary packages the available backends are "QTextBrowser" and "litehtml", and on macOS
additionally "WebKit", which uses the native WebView component.

The code for the litehtml backend is currently part of the Qt Creator repository.
https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/help/qlitehtml

This adds a QPainter based backend for litehtml (not quite complete, but implementing the most
important things that are also used in Qt documentation), and a simple QWidget that integrates that,
with a simple API for setting the URL (as a base for links), the HTML content, zoom factor, default
font, getting the HTML title, finding text and getting the selected content, and callbacks/signals
for loading resources and reacting to clicks.
This part is completely independent from Qt Creator and could be used elsewhere.

Additionally there is a viewer backend implementation for Qt Creator that uses this widget.

Br, Eike

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Development mailing list