Warning, /frameworks/khtml/README.md is written in an unsupported language. File is not indexed.
0001 # KHTML 0002 0003 HTML rendering engine 0004 0005 ## Introduction 0006 0007 KHTML is a web rendering engine, based on the KParts technology and using KJS for JavaScript support. 0008 0009 0010 ## Usage 0011 0012 If you are using CMake, you need to have 0013 0014 find_package(KF5KHtml NO_MODULE) 0015 0016 (or similar) in your CMakeLists.txt file, and you need to link to KF5::KHtml. 0017 0018 To use KHTML in your application, create an instance of KHTMLPart, embed it in 0019 your application like any other KPart, and call methods to control what it 0020 displays: 0021 0022 QUrl url("https://www.kde.org"); 0023 KHTMLPart *w = new KHTMLPart(); 0024 w->openUrl(url); 0025 w->view()->resize(500, 400); 0026 w->show(); 0027 0028 0029 ## Alternatives 0030 0031 Note that using KHTMLPart may introduce security vulnerabilities and unnecessary 0032 bloat to your application. Qt's text widgets are rich-text capable, and will 0033 interpret a limited subset of HTML. 0034 0035 Another option is to use KDEWebKit, WebKit is a fork of KHTML with substantial 0036 industry support. 0037 0038