Port from KHTML to QtWebEngine
Needs RevisionPublic

Authored by svuorela on Wed, Sep 11, 8:51 AM.



Still relies on the man and help kioslaves.

Features lost:

  • printing
  • the abitility to trigger next/previous chapter from the shell
  • the ability to with space automatic switch chapter
  • custom right click menues. The QtWE probably fits us

This kind of fixes T11541

Test Plan

Clicked a bit around, things kind of work. But there are likely bugs still.

The reviewers are some dinosaurs to have a chance of finding errors, and someone my memory identifies as documentation people.

Diff Detail

R125 KHelpCenter
No Linters Available
No Unit Test Coverage
Build Status
Buildable 16367
Build 16385: arc lint + arc unit
svuorela created this revision.Wed, Sep 11, 8:51 AM
Restricted Application added a project: Documentation. · View Herald TranscriptWed, Sep 11, 8:51 AM
Restricted Application added a subscriber: kde-doc-english. · View Herald Transcript
svuorela requested review of this revision.Wed, Sep 11, 8:51 AM
svuorela updated this revision to Diff 65825.Wed, Sep 11, 8:54 AM

Forgot some removed files

Thanks, you have been fast. Would it be possible to use the QWebEngine-based KPart currently in konqueror.git?

Adding Montel because he has experience with locking QtWE down for e.g. mail usage.

Thanks, you have been fast. Would it be possible to use the QWebEngine-based KPart currently in konqueror.git?

I'm not sure it makes much sense - we aren't doing kpart loading, just embedding a widgett.

And a lot of the code in the webengine part is about cookies handling, wallet handling, SSL handling, all irrelevant for KHelpCenter.

mlaurent requested changes to this revision.Wed, Sep 11, 11:08 AM
mlaurent added inline comments.

We still have zoom support in webengine. see setZoomFactor
I think that it's useful to be able to increase/decrease it.


Print support can be implemented

I use a code as it:
bool WebEnginePage::execPrintPreviewPage(QPrinter *printer, int timeout)

QPointer<QEventLoop> loop = new QEventLoop;
bool result = false;
QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit);

print(printer, [loop, &result](bool res) {
    if (loop && loop->isRunning()) {
        result = res;

delete loop;

return result;

see WebEnginePage


QAction *QWebEngineView::pageAction(QWebEnginePage::WebAction action) const
can generate some actions.

This revision now requires changes to proceed.Wed, Sep 11, 11:08 AM

You removed font settings dialog.
But we can add default font as it:

const QFontInfo font(QFontDatabase().systemFont(QFontDatabase::GeneralFont));
settings()->setFontFamily(QWebEngineSettings::StandardFont, font.family());
settings()->setFontSize(QWebEngineSettings::DefaultFontSize, font.pixelSize());

I think QTextBrowser fits better than WebEngine.