• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

KDE HTML Parser and Widget

If you want a fully-fledged HTML browser widget in your application, you can use KHTMLPart to do so.

KUrl url = "http://www.kde.org";
KHTMLPart *w = new KHTMLPart();
w->openUrl(url);
w->view()->resize(500, 400);
w->show();
KHTMLPart
This class is khtml's main class.
Definition khtml_part.h:207
KHTMLPart::show
void show()
Convenience method to show the document's view.
Definition khtml_part.cpp:5680
KHTMLPart::view
KHTMLView * view() const
Returns a pointer to the HTML document's view.
Definition khtml_part.cpp:1059
KHTMLPart::openUrl
virtual bool openUrl(const KUrl &url)
Opens the specified URL url.
Definition khtml_part.cpp:665
KUrl

For more information, see the documentation for KHTMLPart.

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.

Author(s)
Torben Weis <weis@.nosp@m.stud.nosp@m..uni-.nosp@m.fran.nosp@m.kfurt.nosp@m..de>
Josip A. Gracin <grac@.nosp@m.fly..nosp@m.cc.fe.nosp@m.r.hr>
Martin Jones <mjone.nosp@m.s@kd.nosp@m.e.org>
Waldo Bastian <basti.nosp@m.an@k.nosp@m.de.or.nosp@m.g>
Lars Knoll <knoll.nosp@m.@kde.nosp@m..org>
Antti Koivisto <koivi.nosp@m.sto@.nosp@m.iki.f.nosp@m.i>
Dirk Mueller <muell.nosp@m.er@k.nosp@m.de.or.nosp@m.g>
Peter Kelly <pmk@p.nosp@m.ost..nosp@m.com>
George Staikos <staik.nosp@m.os@k.nosp@m.de.or.nosp@m.g>
Allan Sandfeld Jensen <kde@c.nosp@m.arew.nosp@m.olf.c.nosp@m.om>
Germain Garand <germa.nosp@m.in@e.nosp@m.books.nosp@m.fran.nosp@m.ce.or.nosp@m.g>
Maksim Orlovich <maksi.nosp@m.m@kd.nosp@m.e.org>
KHTML has also heavily benefited from the work of Apple Computer, Inc.
Maintainer(s)
Allan Sandfeld Jensen
Germain Garand
Maksim Orlovich
License(s)
LGPLv2
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal