Qt Jambi

Hi!
Maybe you’ve already heard about Qt ( Trolltech ) company. It is best known in the Linux community as the basis for the KDE desktop environment. They are developing a cross platform framework for C++ and Java (Qt Jambi). Today I tested their framework and compared it to Swing/AWT (Sun‘s framework).
The naming conventions are basically identical to Java, the most difference is that in Qt Jambi everything begins with Q (QTable, QPushButton), and not with J like in Swing (JTable, JButton). 🙂
The components are being created on the same way in booth frameworks.

Qt Jambi:

QTableWidget table = new QTableWidget(1000, 5);
QTableWidgetItem item = null;

Swing / AWT:

JTable table = new JTable(1000, 5);
Object data = null;

The concept for filling out tables is the same for booth TableModel and AbstractTableModel. Let’s fill out these tables:

Qt Jambi:

for(int i = 0; i < 1000; i++) {
   for(int j = 0; j < 5; j++) {
      item = new QTableWidgetItem("Test value");
      table.setItem(i, j, item);
   }
}

Swing / AWT:

for(int i = 0; i < 1000; i++) {
   for(int j = 0; j < 5; j++) {
      data = "Test value";
      table.setValueAt(data, i, j);
   }
}

Qt table uses less memory with ~4MB, which is probably caused by the number of preloaded classes. I hope that Qt’s Slot approach for generating events also takes less memory then the Swing listeners. That was for today. I’ll come back with new test result as soon as I can.
Bye!

Advertisements

4 thoughts on “Qt Jambi

  1. Mian Muhammad Arif

    Yup, heard about Qt… while using KDE, you have to use word many times(if not mistaken). Ayn way nice comparison between Swing and Qt. Keep up the good work.Have a nice time.Arif

    Reply
  2. akoskm

    Thank you! I’m trying to be up-to-date with Qt Jambi development. In the last version – due to relicensing – Jambi is being developed by the “community”. I hope they’ll be active, Qt is a widely used cross platform framework, including embedded devices, mobile phones. Java community need framework, like this!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s