Friday, 30 March 2007

Gtk+ vs Qt

If you are developing a GUI application for a Unix OS, selecting a toolkit is a trickier decision than you might think. The two main desktop environment contenders these days are KDE and Gnome. Both are nice clean interfaces whose latest versions are well equipped to handle any UI problem that you will throw at them. Underlying each of these are windowing toolkits used to present the respective user interface elements. Gtk+ for Gnome and Qt for KDE. Which desktop environment do I target and which toolkit do I use?

Qt (on which the KDE desktop environment is built on) is owned by Trolltech. Trolltech maintains strict control over the Qt framework making it a Trolltech product. You become a Trolltech customer if you use Qt. Qt and it's derivatives are commercial products which Trolltech releases under a GPL only license. This means if your product uses Qt it must be GPL or (or an FSF approved license) or you must pay Trolltech licensing fees.

Gtk+ (on which GNOME is built upon), is a community project with many commercial and volunteer members. It's being developed under the GNU umbrella and is LGPL licensed. This means you don't have to pay licensing fees to use it commercially and you are free to open or close source your project at your discretion. If you find yourself making additions to the Gtk+ framework, you can submit them to the community for review and they may be accepted.

If your project is purely commercial then both are acceptable choices. Trolltech will happily help you if you pay a licensing fee, and a Gtk+ community member may help you if you pay them for their time. If your project is purely open source than both are also acceptable. The problem comes if your project could be comercial or it could be open source or it could be something in between then Gtk+ becomes the only choice.

No comments: