Go to file
rtlhq b72dfb7d09
update debian/changelog.
2022-11-30 03:05:54 +00:00
autotests Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
debian update debian/changelog. 2022-11-30 03:05:54 +00:00
docs Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
po Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
src Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
tests Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
.gitignore Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
.gitlab-ci.yml Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
.kde-ci.yml Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
.krazy Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
CMakeLists.txt Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
COPYING.GPL3 Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
COPYING.LGPL-2 Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
COPYING.LIB Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
KF5KHtmlConfig.cmake.in Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
README.md Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00
metainfo.yaml Import Upstream version 5.92.0 2022-10-06 22:26:02 +08:00

README.md

KHTML

HTML rendering engine

Introduction

KHTML is a web rendering engine, based on the KParts technology and using KJS for JavaScript support.

Usage

If you are using CMake, you need to have

find_package(KF5KHtml NO_MODULE)

(or similar) in your CMakeLists.txt file, and you need to link to KF5::KHtml.

To use KHTML in your application, create an instance of KHTMLPart, embed it in your application like any other KPart, and call methods to control what it displays:

QUrl url("https://www.kde.org");
KHTMLPart *w = new KHTMLPart();
w->openUrl(url);
w->view()->resize(500, 400);
w->show();

Alternatives

Note that using KHTMLPart may introduce security vulnerabilities and unnecessary bloat to your application. Qt's text widgets are rich-text capable, and will interpret a limited subset of HTML.

Another option is to use KDEWebKit, WebKit is a fork of KHTML with substantial industry support.