Next: Creating and Displaying a
Up: KDE and Qt
Previous: Events Happen
Contents
The Names of Things
- The Qt class names begin with the letter Q and the KDE class names begin with the letter K. That way, when you read the source code of a program, you can determine where a class is defined. If you find two classes that have the same name except for the first letter, it means that one is an extension of the other.
- For example, the KDE class KPixmap uses the Qt class QPixmap as its base class. Every class in Qt and KDE is defined in a header file. In every case (well, almost every case), the header file derives its name from the name of the class.
- For example, the header file for the QPopupMenu class is named qpopupmenu.h, and the class KFontDialog is defined in kfontdialog.h. However, this naming convention is not universally true because more than one class can be defined in a header.
- For example, the class KFontChooser is also defined in kfontdialog.h. Also, some source filenames are abbreviated. For example, the header for KColorDialog is named kcolordlg.h.
Next: Creating and Displaying a
Up: KDE and Qt
Previous: Events Happen
Contents
Cem Ozdogan
2007-05-16