GTK vs Qt
GTK+ and Qt are open-source cross-platform User Interface toolkits and development frameworks. These are the two most popular frameworks in use for Linux and BSD because they are open-source and give developers a powerful toolkit to design Graphical User Interfaces. GTK+ is used as the standard toolkit for the GNOME, LXDE and Xfce Desktop Environments while Qt is used for KDE and Razor-Qt.
Qt is developed by an open community around Qt Project, with main developers being Digia, KDE and many other users of Qt. Qt development team was originally known as Trolltech, then acquired by Nokia in 2008 and known as Qt Software.
GTK+ was originally created to develop GIMP graphical application and is now developed and maintained by the GNOME Foundation.
Qt was designed from the ground-up with object-orientation in mind. It uses a code generator called moc and uic to deliver features at higher-level than those available in C++ (signals, slots, object introspection, scriptability, GUI integration).
GTKmm, the C++ interface to GTK+, uses standard C++ templates. Unlike Qt APIs, GTKmm has been added on top GTK+ and thus was not designed from the ground-up. Because of this, it is said that GTKmm reflects some design decisions seen in the GTK+'s API for C.
There is extensive documentation for Qt at the QtProject website.
GTK+ has documentation available both online and locally using the DevHelp system.
Both Qt and GTK+ were developed from the ground up with Object Oriented Programming in mind. Qt is developed in C++, GTK in C in an object oriented manner using the GObject type system. C++ bindings are available through gtkmm.
Qt is a complete consistent framework. You can easily connect HTTP events to GUI elements, fill forms with results from a database query or build an interactive visualization of large datasets. Qt 4 modules include QtCore, QtGui, QtMultimedia, QtNetwork, QtOpenGL, QtOpenVG, QtScript, QtScriptTools, QtSql, QtSvg, QtWebKit, QtXml QtXmlPatterns, QtDeclarative, Phonon, Qt3Support. Modules for working with Qt tools are QtDesigner, QtUiTools, QtHelp, QtTest. Modules for Windows developers are QAxContainer, QAxServer. Module for Unix developers is QtDBus.
GTK+ is only a GUI toolkit, but can be seen as part of a GObject based library stack. It interoperates very well with other libraries such as GLib, GIO, GNet, GStreamer, Poppler, Pango, Cairo and Clutter.
Both Qt and GTK+ are available on most popular desktop Operating Systems. For mobile devices, Qt for Embedded allows Qt to run directly on the hardware, without the need of X11 or a window manager. The first Qt application started becomes the window manager featuring full composition and top-level transparency. GTK+ on embedded devices (e.g. Meego) requires an X11 server + window manager, resulting in at least three processes running for a hello world application.
|Windows XP, Vista, 7||Native||Native|
|Windows Mobile (CE)||Native||Not available|
|Mac OSX||Native||Native |
|Linux/Unix (framebuffer)||Native||Native |
|Linux/Unix (eglfs)||Native||Not available (GNOME extension exists )|
|Symbian (S60 3rd edition and later)||Native||Not available|
|maemo 6 (Harmattan)||Native||Not available|
|BlackBerry 10||Native||Not available|
|Ubuntu Mobile||Native||Not available|
|SailFish OS||Native||Not available|
|AmigaOS||Native ||Not available|
Qt GUIs look and behave more natively than GTK+ GUIs on Windows and Mac platforms. This is because Qt calls native painting primitives whenever possible and practical; but the native support is wrapped within just another style. Even so, neither Qt nor GTK+ will look and feel completely native on Windows or Mac because this is not feasible when portability is one of the design goals. Non-native OS-independent user experience can be achieved with both toolkits by setting one of their portable widget styles.
Both toolkits use similar amount of memory and CPU for similar tasks when traditional widgets are used. Differences demonstrated in old analysis come from the usage of old compilers or specific setups so are no longer valid. GTK+ has no equivalent of QtQuick APIs, runtime and tools. QtQuick outperforms GTK+ widgets in terms of performance of animations and transitions.
 Native Languages and Language bindings
GObject libraries, the base for GTK+, have a tool to allow them to be available to any language supporting GObject-Introspection. Any library with a new release, can install its GIR (XML format) and Typelib files, to be available for bindings with no extra effort and by-hand created binding.
GTK+ applications can also be developed with Vala, an object oriented programming language similar to C#, specially designed for the GObject type system. Vala programs compile to C code, without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.
Python bindings: Mature and actively-developed LGPL bindings exist for both GTK+ (PyGTK and PyGObject) and Qt (PySide, PyQt). PySide was funded by Nokia to provide free bindings (mostly) compatible with the more restrictively, GPL-licensed free version of PyQt. PySide is now part of the Qt Project. Binaries are available for Linux, OS X and Windows.
A good example is when Nokia (previously focused on GTK+) announced that it will improve the co-operation with Trolltech (Qt). Motorola representatives announced they will focus more on the GTK+ toolkit .
In 2008, Nokia acquired Trolltech to get premium support in Qt for (then emerging) Nokia's mobile platforms such as new Symbian and maemo/MeeGo Harmattan, ditching GTK (and in case of symbian a home-brewn toolkit) as main development library for these devices. In 2009, Nokia adopted the LGPL for Qt. In 2011 qt-project.org went public with open collaboration and meritocracy rules, bringing its governance and licensing to the same level as GTK. The sales of the Qt department in Nokia (with the trademark and most developers) to Digia has so far not impacted this and
 Size of development teams
According to Ohloh, GTK has about 210 contributors adding around 3000 commits a year. Qt, with the development focus moving from Qt4 to Qt5 and having introduced open governance only in 2011, is a bit harder to measure. Qt4, in maintenance, sports a contributor number comparable to GTK, but has only about 1700 commits in the last 12 months. Development has clearly moved to Qt5 where the over 400 contributors committing a staggering 15780 commits in the last year reflects the fact that the majority of Qt developers works full-time on the tool kit, while GTK+ depends more strongly on volunteer contributions.
During the year, GTK hovers around 25 contributors per month, Qt5 has a little over active 100 coders adding their change sets in the same time, contradicting the starkly negative wake-up call GTK maintainer Benjamin Otte wrote claiming that GNOME has 20 core hackers at most and GTK is down to one paid developer — himself. Both tool kits are still actively maintained and developed and also have many non-core libraries providing additional features and functionality to the ecosystem, with GTK building on glib, Clutter and more while Qt stands to benefit from the work in splitting off the KDE Libraries to stand-alone, reusable parts with minimal dependencies in KDE's Frameworks 5 efforts.
GTK+ is under the LGPL. This means that it can also be used by closed source applications in environments which support dynamic linking. Unlike with Qt, GTK+ has no license option to be extended or compiled into a closed source code. This option is enabled to Qt which has (within Qt Project) an agreement with Digia, who provides Qt under the terms of a commercial licensing agreement. This version of Qt is called Qt Commercial.
Qt is available under the terms of the GNU Lesser General Public License (LGPL) version 2.1. This version of Qt is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions.
- A reasonably complete comparison at techfreaks: http://techfreaks4u.com/blog/?p=1021
- WxWidgets Compared To Other Toolkits, a comparison between wxWidgets and a number of other toolkits, including GTK+ and Qt