GTK+, wxWidgets, and Qt
I read an article about a planned redesign of GTK+ today. Every now and then I ask myself if GTK can really be all that much worse than Qt. I mean how bad can it be, right? Well, here are the three "Hello World" examples I found. See for yourself:
- GTK+: http://bo.majewski.name/bluear/gnu/GTK/plain
- wxWidgets: http://www.wxwidgets.org/docs/tutorials/hello.htm
- Qt: http://doc.trolltech.com/4.3/tutorial-t1.html
Maybe I'm missing something here, but it seems clear to me that GTK is ugly. Now I freely admit that having not actually written an application in GTK, I shouldn't really comment, but as a potential user looking at that example, I wouldn't touch GTK with a 10-foot barge pole. It looks ancient and complicated, and the learning curve looks almost vertical. Clearly however, GNOME is flourishing, so someone must like it! Maybe it's because it's a C toolkit? Surely people don't still squabble about C++ being slow in these days of Javascript applications? Maybe it's a philosophical thing.
WxWidgets seems better to me. The code is slightly clearer, but not by much. WxWidgets also has a native MacOS X port, but I hear that GTK also has a port underway.
So it seems obvious to me that Qt is the clear winner when it comes to elegance, design, scalability, and learning curve. So why do all the big apps use GTK? Firefox, Pidgin, Inkscape to name just a few. I guess it's something to do with the whole dual-licence thing, or maybe because they're scared Qt won't always be under GPL (it will be, by the way). I'm also learning that an awful lot of developers out there are motivated by politics and law; maybe it's because Qt isn't a traditional "Free Software" project? Personally, I'm motivated far more by technology than philosophy. When the battles rage between Linus Torvalds and the FSF, I'm always on Linus's side :) [edit: another Linus rant]
Incidentally, I just discovered that VLC has switched from wxWidgets to Qt. Yay!
Danns.co.uk