|
|
|
|
GTK+ 与 QT 的不同
作者:
刘鹏整理
日期:
2008-09-09
|
|
本文来自 GTK+ 的邮件列表,GTK+ 的开发人员对 GTK+ 和 QT 做了简单的比较。
The main differences between QT and GTK+ are:
- Qt is C++ based but it uses C++ in its own way because of its cross-platform
nature (through a special preprocessor)
- GTK is C based but it uses its own "object oriented" approach.
- Qt can rely on QtDesigner and KDevelop that, together, make up a real IDE
(similar to Visual Studio)
- GTK must rely on Glade only, that is a GUI builder equivalent to QtDesigner.
There is nothing like KDevelop for GTK (AFAIK).
- Qt runs (with recompilation) on Linux/Unix, MacOS X and Windows (all
versions)
- GTK runs on Linux. There is a porting of the old GTK1.2 for Windows. A
Porting for Mac OS X is under development (AFAIK)
- Qt has internal support for scripting (QAS)
- Should you need to add scripting capabilities to a GTK application, you have
to embed your own engine (Python, LUA...)
- Qt has integrated data-aware widget for data-centric applications.
- GTK has a separate project (gnome-db) for data-aware widgtes
- Qt-based applications and the KDE desktop "talks" each other via DCOP
- GTK applications and Gnome "talks" each other via CORBA
- Qt has exhaustive bindings for Python and a few other language (maybe Perl
and Scheme)
- GTK has exhaustive bindings for C++ (GTKmm), Python (PyGTK) and Ruby. There
are less complete bindings for Perl, Scheme, Lua and so on. Have a look at
www.gtk.org for a complete listing of the available bindings and their
development status.
- Qt has exhaustive documentation and a lot of examples form Trolltech and the
KDE team
- GTK has exhaustive documentation and a lot of examples from GTK team
- Qt is freeware on Linux only
- GTK is always freeware (but it is not completely available on Windows and
MacOS X)
翻译总结如下所示。
GTK+ 与 QT 的不同主要有:
- QT 基于 C++ 开发,GTK+ 基于 C 语言开发,但采用了面向对象的思想;
- QT 有 QTDesigner 和 KDevelop 等工具,可以组成一个完整的 IDE ,GTK+
只有 Glade ,一个 GUI builder (相当于QTDesiger);
- QT 具有很好的跨平台性,支持 Linux/Unix、MacOS X 和 Windows,GTK+
主要是 Linux 平台,其它平台的支持正在开发中;
- QT 本身支持脚本,GTK+ 需要嵌入自己的脚本引擎;
- QT 为数据密集的应用提供了 data-ware widget,GTK+ 有一个单独的工程
gnome-db
- QT 应用与 KDE 桌面通过 DCOP 通信,GTK+ 应用与 Gnome 通过 CORBA 通
信;
- Qt 支持与 Python、 Perl、Scheme等语言的绑定,GTK 实现了与 C++
(GTKmm), Python (PyGTK) 和 Ruby 的绑定;
- Qt 是双授权,由 Trolltech 公司和社区支持,GTK+ 完全开源,由社区支
持。
|
|