Next Previous  Table of Contents

The next pages will use a language that is usual among gui developers, for example, the word widget . A widget is everything you see on the screen, a button, a window, a scrollbar, a menubar, etc. As you can see, some widgets even contain other widgets inside of it . From a developer point of view, you can think that every specialized widget inherits a base widget class, that is, the QWidget class.

The layout of widgets is then, the way widgets are placed on the screen, one under another, one beside another, etc.

I'll try to explain the rest of words as they appear.

Compilation of a KDE application

I'm using in this sources the autoconf/automake applications to generate Makefile files . There are many complex scripts made mainly by Stephan "coolo" Kulow. These scripts have been copied from the standard KDE packages and modified a little to be used in this tutorial.

Running "make -f Makefile.dist" will generate the configure script and the files in each directory using the respective file. To complete the operation, you'll need the autoconf/automake packages installed on your system. In this step, Stephan makes some magic with the scripts in order to get automatically some things done instead of having to explicitly write a bunch of rules in each . If you don't have automake/autoconf don't worry, this step is not neccesary to try the tutorial and you can simply go to the next paragraph. But anyway, you'll need automake/autoconf once you start developing your own application.

When you run "./configure" the Makefile files are created using the recently created files as templates.

Now you can really run "make" to build the binaries.


As you'll read later in the tutorial, some files will have to be preprocessed by the meta object compiler, moc. To use moc, you just have to use a trick, which is to use the following definition in :


The scripts that generate the final Makefile file will parse it and generate rules to create these files using moc.

The final code that process the meta object sources in Makefile is something like the following one :

p3.moc.cpp: $(srcdir)/p3.h
        $(MOC) $(srcdir)/p3.h -o p3.moc.cpp  

Similarly to this, in p6, p7 and p8 it will be needed to use a preprocessor for the DCOP interface of these applications. This is done with the following commands :

 dcopidl appIface.h > appIface.kidl
 dcopidl2cpp --no-stub appIface.kidl  

This will generate an appIface.kidl file with a xml definition of the application interface, and a C++ file called appIface_skel.cpp with the skeleton of the Interface ready for you to implement it. If you use to do CORBA programming, you'll probably find this naming scheme of skels and stubs very familiar.

More information

If this tutorial is of any use, after reading it you'll start your own KDE application. If that's the case, you'll probably face new problems which aren't described in these pages, that's why I've put here some notes, addresses, urls, etc that might be useful to get some help.