小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

GTK vs Qt - WikiVS

 haliiz 2010-04-05

From WikiVS, the open comparison website

Jump to: navigation, search


GTK Qt
GTK
VS
Qt
http://www. http://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 and Xfce Desktop Environments while Qt is used for KDE.

Contents

[hide]

[edit] Development

Qt is developed by Qt Software, a division of Nokia. Qt Software was originally named Trolltech before being acquired by Nokia in 2008.

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 a code generator called MOC.

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

[edit] Design Tools

With GTK+, many people use Glade to easily construct the GUI visually and then code the callbacks. The problem with Glade is that it brings one more library dependency. GtkBuilder, which is included in GTK+, is a substitute for Glade. It is recommended by GTK+ developers to use GtkBuilder over Glade. Now developers can design a GUI in Glade Designer and convert them to GtkBuilder XML using converter utility in Makefile.

Qt has Creator, which functions both as an IDE and also seamlessly incorporates 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 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.

[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, 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. Maemo) requires an X11 server + window manager, resulting in at least three processes running for a hello world application.

OS Qt GTK+
Windows XP Native Native
Windows Vista Native Native
Windows Mobile (CE) Native Not available
Mac OSX Native Port available [1]
Linux/Unix Native Native
Symbian (S60) Native Not available

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. From the other hand GTK+ brings more consistent user experience when switching from one platform to another, since Look And Feel remains unchanged.

[edit] Performance

GTK+ proponents say that GTK+ uses less memory than Qt. The difference, however, is negligible according to Qt advocates. The reason some people are seeing Qt hogging memory is mostly that they're using an old version of the gcc compiler - it used to be very inefficient at generating C++ code especially for advanced features such as templates and exceptions. These problems have long been fixed; with gcc 4.4, Qt typically does not use more memory than GTK+.

[edit] Native Languages and Language bindings

Natively, Qt has C++ based libraries. It also supports Java [2] (officially supported in the past, but not anymore [3]), Perl [4], Python [5] [6], PHP [7], and Ruby [8] based development. Qt also ships with the embedded scripting language QtScript, which is an ECMA-Script (JavaScript) implementation.

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

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)[16]. Motorola representatives announced they will focus more on the GTK+ [17].

In 2008, Nokia acquired Trolltech to gain control of Qt. In 2009, Nokia adopted the LGPL for Qt.

[edit] Licenses

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

Qt is triple-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. Until recently, Qt required a proprietary license for use on MS Windows, but it has finally been made available under the GPL in its MS Windows compatible version. The last license is the LGPL, which Nokia adopted in January 2009. The LGPL allows the free version of Qt to be included in software which isn't licensed under the GPL (proprietary software, or open source software released under a different licence).

[edit] Links

A reasonably complete comparison at techfreaks: http:///blog/?p=1021

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多