Qt vs GTK

From WikiVS, the open comparison website

Jump to: navigation, search


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 FreeBSD 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 Desktop Environment while Qt is used for KDE.

Contents

[edit] Development

Qt is developed by Trolltech. Trolltech has been acquired by Nokia, and has been renamed to Qt Software.

GTK+ was originally created to develop GIMP and is now developed and maintained by the GNOME Foundation.

[edit] Usability

Qt's API is said to be cleaner and better documented than GTK's.

Qt uses non-standard C++ coding methodologies. This is primarily exemplified by the use of MOC.

GTKmm, the C++ interface to GTK+, uses standard C++ templates.

[edit] Designer Tools

With GTK, many people use Glade to easily construct the GUI visually and then code the callbacks.

Qt comes with Qt Designer, a tool that allows easy layout of widgets and simple connections of slots and signals between widgets.

[edit] Documentation

Trolltech has extensive documentation for Qt.

GTK+ is lacking in documentation compared to Qt.

[edit] Framework

Both Qt and GTK+ were developed grounds 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.

[edit] Coverage

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.

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.

[edit] Portability

Both Qt and GTK are available on most popular desktop Operating Systems. For mobile devices there is available Qt technologies (Qtopia) and GTK+ (native in Maemo platform)

OS Qt GTK
Windows XP Native Native
Windows Vista Native Native
Mac OSX Native Port available [1]
Linux/Unix Native Native

Qt looks more native than Gtk+ on Windows and Mac platforms. This is because Qt tries to use native widgets whenever possible. Even so, neither Qt nor GTK+ will look and feel completely native on Windows or Mac.

[edit] Performance

GTK+ proponents say that GTK+ uses less memory than Qt. The difference, however, is negligible according to Qt advocates.

[edit] Native Languages and Language bindings

Natively, Qt has C++ based libraries. It also supports Java [2] (officially supported), Perl [3], Python [4], PHP [5], and Ruby [6] based development.

Natively, GTK+ has C based libraries. It supports several languages like for example C++ [7], Java [8], Perl [9], Python [10], PHP [11], Ruby [12], and Mono/C# [13].

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.

[edit] Rivalries

A good example is when Nokia (prior focused on GTK+ ) announced that it will improve the co-operation with Trolltech (Qt)[14]. Motorola representatives announced they will focus more on the GTK+ [15].

In 2008, Nokia acquired Trolltech to gain control of Qt.

[edit] Licenses

GTK+ is under the LGPL license. This means that it can also be used by closed source applications in environments which support dynamic linking.

Qt is dual-licensed. For one it is available as GPL licensed library which can only be used by open source projects with compatible licenses. But there is also a commercially available proprietary license, which allows for the development of closed source software using Qt.

[edit] Links

[edit] Pro Qt

Personal tools