File: README.md

package info (click to toggle)
khtml 5.54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 18,940 kB
  • sloc: cpp: 206,281; java: 4,060; ansic: 2,829; perl: 2,313; yacc: 1,497; python: 339; sh: 141; xml: 37; makefile: 7
file content (38 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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("http://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.