Qt

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search


"Qt is a cross-platform application and UI framework," says the official site. I hate the word "framework" though, as it can refer to too many things, not as much as the word "system", but enough to make things pretty confusing. The "t" in "Qt" stands for "toolkit", which describes it much better. It is in fact a set of tools. It is also written as "Qt", not "QT". The latter stands for Apple QuickTime and has very little to do with programming, although even Qt users often make this mistake.

If describing Qt as a toolkit doesn't really clarify things much more than the word "framework", here is a non-exhaustive list of tools that Qt consists of:

The main component is a set of libraries, written natively in C++. These libraries include: the core library providing the most important stuff, the GUI library surprisingly providing the GUI components, the networking library, the XML library and something more.

The MOC tool which is a program to generate some boilerplate code in C++ to use with conjunction with some macros provided by the core library. This extends C++ a little bit, adding nice features like more powerful RTTI, the signals/slots mechanism similar to events/delegates in C# allowing typesafe callbacks, the plugin/interface mechanism which provides a way to extend applications by implementing a pre-defined interface.

The GUI designer tool and the UIC. Qt Designer is a graphical tool to create GUIs visually and save them to XML files, and the UIC is a command-line tool to translate those XML files to C++ code.

The tools to internationalize applications, namely Qt Linguist, the lupdate tool and the lrelease tool. lupdate extracts text strings to be translated from C++ code into an XML file, Qt Linguist is a graphical tool for translator to edit those XML files and provide translations, and lrelease compiles the translated texts into a binary file to be loaded by a Qt application at run time.

The resource compiler tool, used to integrate various data files (like pictures and sounds) into an executable file, forming a virtual file system inside it.

The qmake tool, used to automate build process, so you don't have to run MOC, C++ compiler, UIC and other things manually.

The Qt Creator, a graphical IDE to integrate all the stuff described above into a single environment.

Programs written in portable C++ and using Qt can be recompiled with no changes for any platform supported by Qt. This includes Windows (at least XP and later), Linux (pretty much any distribution), Mac, various Unices like FreeBSD, HP-UX, Solaris and much, much more.

The native language of Qt is C++, but bindings are provided for other languages, many of them. Some of these bindings are provided by Trolltech (well, now it's Nokia), some by third parties. Bindings are not alternative implementations of Qt for other languages, but rather special add-ons to those languages allowing to use C++ Qt binaries. This can lead to many troubles, differences in interface and various inefficiencies, but that doesn't mean that they can't or shouldn't be used. It's just that C++ remains the main language of Qt. shareimprove this answer

source: StackOverflow, posted by: Sergey Tachenov - the best written brief summary on Qt seen thus far.