Tuesday, August 05, 2008

Qt - Conclusion

Strengths of Qt

The resource editor of Qt is very powerful. The message loop of Qt can be coded manually, unlike several other widget toolkits. It has a powerful layout manager to simplify work.

Qt consists of several powerful features such as Controls, XML, Regular Expressions, Platform Independence, Template classes, memory management, Network API, Database API, OpenGL API. It also has a very good documentation, both online and offline.

Qt - Gaming In Qt

The previous article covered a simple GUI application, let’s extend this concept to a game, written completely in Qt. Here is the screen-shot of the game. This game is popularly known as "Pocket Tanks" in the gaming market.

Qt - A Simple Example

Enough of the theory; let’s get into the action. Here is a sample window which will take a name and displaying a message. Before we get into the coding part, it is more important to analyze how the window works.
Basically this window can be broken down into 4 components
  1. A Text Label
  2. A Text Field
  3. A Button
  4. A Message Box
Now let’s see how the system works. A user keys in his name, then clicks the button, once the button is clicked a message box appears which reads from the text field and displays a message. Download the source from here.

Qt - Programming In Qt

The primary prerequisite of learning Qt is C++. As already stated that Qt builds on the libraries of C++, it is vital to know the concepts of C++ like classes; private, protected and public members; inheritance, etc.

Like any traditional C++ program, the execution of a Qt program also starts from the function main(). A few enhancements do exist for Qt such as Signals And Slots. These are primarily responsible to establish connectivity between various widgets of the application.

Every Qt program consists of an application and several widgets built inside it.

Qt - Introduction To KDE

KDE stands for K Desktop Environment. Qt can be significantly experienced on a KDE desktop. The Qt toolkit was used for the KDE project. Every window available on the KDE desktop is a part of the Qt design.

Actually KDE is primarily built on several technologies such as
  1. KHTML- an HTML engine
  2. Plasma - desktop and panel widget engine
  3. Phonon - multimedia framework
  4. Solid - device integration framework
On top of this the entire UI is built on the technology of KDELibs, which is in turn built on Qt.

Qt - Introduction And Working

Qt is a cross-platform application development framework, widely used for the development of GUI and non-GUI programs. Originally Qt was developed by a Norwegian company, Trolltech. It is presently being acquired by Nokia.

Examples of GUI applications using Qt are the VLC Media Player, Opera, Adobe Photoshop Album, Google Earth, Mathematica, etc. Non GUI applications include console tools and servers.

Qt - UI (User-Interface) Designing

Technically UI design refers to the design of computers, applications and websites with the focus on the users experience and interaction. There are several tools for UI design.
  • Windows API specific to only Microsoft Windows. This is achieved by primarily including “windows.h” and using its functions to create windows
  • Java and Swing. The Swing package of Java can be used to create any UI required. However the entire Swing package is based on Java, and to run any of these windows, a JVM is required
Coming to UNIX, several toolkits have been designed for the X Window System. The most popular of them being -
  • GTK+, standing for “The GIMP Toolkit” – Examples of applications using this is the GIMP, Terminal and others
  • Qt, pronounced as cute
The KDE desktop environment is built on Qt. And the GNOME (GNU Object Model Environment) desktop environment is built on GTK+.