Qt, now a viable option for Java

Today it was announced that Qt would be made available under the LGPL license. Qt is well known in the Linux community thanks to KDE, but Qt based applications run very well on Windows and OS X, as well as many embedded platforms such as WinCE and S60.

I’m a closet Qt fan, because:

  • It has a clean OO programming model. Simple, extensible, yet not over the top.
  • It has easy to use bindings for a wide variety languages, including C++, Java, Python, Ruby, Perl, PHP, and C#.
  • It’s mature with a rich set of widgets. Including typical windowing components, a WebKit based browser, media playback, OpenGL, etc.
  • The resulting apps look good, feel fast and fit in with the native platform.
  • It’s very extensible/flexible.

Of course, on each of those points alone there are other frameworks that can beat Qt – it’s the combination of all of these that makes it so compelling.

Oh yeah, Java…

Jambi is the Qt binding layer for Java. It’s actually been very well thought out, allowing you to use pretty much any of the functionality in the C++ layer, with a simple Java API and set of conventions. It also includes bindings allowing Qt and Swing components to seamlessly co-exist in the same UI.

There are parts of the Qt Java API that make me cringe slightly (namely using reflection for event callbacks), but overall the benefits outweigh these – I’ll just have to get over the cringey bits and live with them.

I’ve used Swing and SWT extensively on some big (and small) projects. I’ve only dabbled with Qt, but from that I’ve been productive very quickly and built some solid UIs in little time. The reason why I’ve previously chosen not to use it on ‘real projects’ was due to licensing. Now that it’s LGPL, that changes everything.

If I were to start a new project tomorrow and needed a serious Java UI, Qt would be my first choice.

Ok, that wasn’t really a convincing argument. How about checking out:

  • Trackback are closed
  • Comments (0)
Comments are closed.
%d bloggers like this: