Qt is one of the most popular GUI toolkits in the open source world, and it serves as the foundation of the KDE project. Getting started with it is a snap.
You probably already know that the windowing system that runs on nearly every Linux machine is the X Window System, also known as X11. (See The History of XFree86, to learn about where X11 comes from and how it came to be available on Linux.)
X11, by itself, only implements low-level primitives such as line drawing, color manipulation, event handling, etc. — the basic building blocks that GUIs are made from. It is certainly possible to design a graphical user interface from such small building blocks, but doing so for any substantial application could take more than a lifetime. Nowadays, only two really have a strong following in the open source world — GTK and Qt.
GTK was originally developed as a replacement for Motif that could be used in the GIMP; it has since taken on a life of its own and is currently being developed independently. In fact, many applications now use GTK for their GUIs. GTK also forms the base of the GNOME desktop that is used on some Linux systems. One distinguishing feature of GTK is that it is implemented in C, but in an object-oriented fashion. What the GTK team did was very clever, but can result in awkward situations sometimes. (To find out more about GTK, see our previous article, “Getting GUI with GTK,” at http://www.linux-mag.com/2001-06/gtK_01.html.)
And then there’s Qt. It has a clean, object-oriented programming interface and abundant features. Qt-based applications are very responsive and have an acceptable memory footprint. Qt…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: