Skip to main content

Qt Jambi - a new toy

Posted by lordy on July 29, 2006 at 11:02 AM PDT

Trolltech release a prototype of Qt for Java, called Qt Jambi. I know Qt from KDE, but i never use it.

You should checkout the documentation, faq, and the Whitepaper. If you also want to try it, here is the download.

I never try SWT, or such stuff like gnome java bindings, but today I have time to play around, and write about it.

Qt Jambi is current available for Windows, Linux and Mac. So SWT had a better platform support.

One thing I wonder is that Qt Jambi comes not with a Javadocs documentation.

As I know the Qt Designer is recommended why to build a GUI. On my Powerbook 1.25 GHz it feels not so fast as NetBeans Matisse. The Singal/Slots editor is very nice compared with Matisse Connection Manager.

Qt Designer generate *.ui files, which you must compile to java file with juic. I don't find a way to do this in Qt Designer, so this is another work procedure.

In the Whitepaper they wrote that the code is more readable. I also think about this. Here the example from the Whitepaper.

Swing:

slider.addChangeListener(new ChangeListener() {

     public void stateChanged(ChangeEvent e) {

          spinner.setValue(slider.getValue());

     }

});

spinner.addChangeListener(new ChangeListener() {

     public void stateChanged(ChangeEvent e) {

          slider.setValue((Integer)spinner.getValue());

     }

});

Qt Jambi:

slider.valueChanged.connect(spinBox, "setValue(int)"); 
spinBox.valueChanged.connect(slider, "setValue(int)");

I agree that it is much shorter, but do you know what? It does not interest me. Why? Because I don't write it, that makes my IDE. But I know that my IDE can't auto-complete this "setValue(int)" string.

Also Qt Jambi use Styles, which I compare with look and feels of Swing, and also have the disadvantages that it look not 100% native.

So that are my impressions about QT Jambi.

Related Topics >>