KDevelop 1.4

KDevelop provides a tool that combines the resources of contributors and existing open-source products.
Qt Designer

KDevelop 1.4 uses Trolltech's Qt Designer. Qt Designer provides a professional interface, allows GUI building with most of the Qt widgets and is a very useful tool for relating GUI widgets and components with each other (best thought of as visual programming).

Here is a synopsis of the process to create GUI components with Qt Designer under KDevelop 1.4 (see Figure 8).

Figure 8. The KDevelop 1.4 GUI Builder, Trolltech's Qt Designer

Qt Designer is a major product itself and requires a separate article to fully describe its capabilities and usage. In this article, its relevance to KDevelop will be covered.

Qt Designer allows the use of layout tools and access to all widget properties. It has the ability to create relationships between widgets, such as the click on a push button with the closing of a window.

Qt Designer only generates an intermediate XML .ui file describing the dialog. Another Qt utility, uic, is used to generate the actual source code files from the .ui file. KDevelop 1.4 supports the .ui files, but the user needs to add the .ui file to the project. When the user initiates a make or rebuild, KDevelop automatically calls uic to generate the relevant associated code.

Unfortunately, uic rewrites all the generated code files whenever the user changes the .ui file with Qt Designer. This implies that the user cannot edit these generated source files. To use the code generated by the uic tool the user needs to inherit the generated code classes before implementing the user-defined functionality.


KDevelop harnesses gdb in order to provide debugging facilities (see Figure 9). Clicking in the left-hand column of the editing windows sets a breakpoint in existing code. The breakpoints can even be set when the program is not running or is in a noncompilable state, which are known as lazy breakpoints. KDevelop displays lazy breakpoints in blue and active breakpoints in red. A little green arrow next to the corresponding line of source indicates the current point of execution.

Figure 9. Debugging the Project

KDevelop provides most of the required basic debugging functionality, such as basic execution, next line and program interruption. The user can activate a floating debugging toolbar for easier debugging command access (see Figure 10). In the tree views, the variable tree tab displays the currently available variables.

Figure 10. The Floating Debugger Toolbar

Debugger-related information is displayed in the debugger, assembly, frame stack and breakpoint output windows.

The problem with the default debugger support is that users wishing to do finer-level debugging cannot access gdb directly. Another problem is that the user can alter variable values only in a non-intuitive way via the Watch input line. However, KDevelop can be configured to use an external debugger, such as the ever-popular DDD, kdbg and xxgdb.

External Applications

KDevelop allows the executions of KDE applications within its framework. Applications such as the GIMP, Ark and KBabel are set up by default. Users can add their own via the options->tools menu.

Compiling, Building and Distribution

Compilation and building of the project can be done through various menu options, such as make, clean, rebuild, clean for distribution and auto configuration. KDevelop is intelligent and will prompt you, if necessary, to rebuild the project before program execution.

The Project->Make Distribution->Source.tgz menu item allows the creation of the source for distribution. Unfortunately, there does not seem to be a way of automatically generating RPMs or RPM spec files for more useful packaging.