Home · Examples 


Qt Jambi for C++ Developers

This overview is intended for C++ programmers that are already familiar with Qt and that would like to migrate to Qt Jambi. We will give a quick guide to issues that might confuse or misslead unexpecting C++ programmers venturing into the Java World with Qt Jambi.

We present these issues in a list in the next section.

The List

We here present a list of issues that it might be good to know about. Note that using the '=' operator in java is a potentially dangerous operation for C++ programmers used to value types. In C++, the object will be copied and a new reference returned, but in Java, you will just get a new reference to the same object. If you wan't to copy an object, you will have to copy it field by field, or use any copy constructor explicitly.

Note also that Java has run-time type inference. We can therefore leave the Qt rcc tool and all the QObject macros. Also the Qt Meta Object System, with its properties and is unessasary in Java, because of the introspection provided for all classes provided by Java (see the java.lang.reflect package for details).

That sums up the most important issues to be aware about. If you bump into others you feel deserve a place in this list, don't hesitate to let us know through the Jambi mailing list.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Jambi 4.5.2_01