Creating KParts components, Part 1
David Faure, Maintainer of Konqueror
In this tutorial, David Faure shows developers how to create KParts components -- the component technology that was introduced with the release of KDE 2. You'll get an intro to the core KParts concepts of read-only and read-write parts and network transparency. You'll learn how to create a read-only component, and then modify it to be a read-write component. You'll also learn how to deploy the component so that Konqueror can use it.
After you register, you can use your userid and password to access any tutorial on the site without entering them again. Be sure to remember your userid and password. Whenever you restart your browser, you'll need to re-enter them to access any tutorial. If you forget your userid, you can create a new one from the
This tutorial assumes familiarity with C++ application development: classes, methods, members, etc. It also assumes a basic knowledge about Qt, such as signals and slots. Previous experience with KDE development will help in understanding the tutorial, although it isn't required.
In addition, the following tools are necessary to execute the code in this tutorial (this information is also repeated in the first section of the tutorial, under "Before you begin"):
- KDE 2.x or 3.x and its development packages. KDE 3 is recommended, since it simplifies some of the code needed to use KParts. Download KDE from kde.org.
- A C++ compiler (usually gcc) and other standard GNU programming tools (make, autoconf etc.), which all come with any Linux distribution. You can download gcc from GNU.
- Developers who prefer an IDE instead of a simple text editor can use KDevelop.
- Without KDevelop, it is necessary to use the kdesdk package to generate a compilation framework. You can get kdesdk from kde.org (as well as from many other places Web-wide).
It is possible to read through the tutorial without compiling the code, but you won't see the XML files as a tree in Konqueror.
"Creating KParts components, Part 2", by David Faure (developerWorks, June 2002)
Tutorial length: Under two hours
Formats: HTML, PDF, Zip