I've downloaded the QT Jambi Preview and began playing with it.
First observation: It is extremely easy to install.
Second observation: It's seems very familiar
Third observation: It looks like a merging of C++ and Java, but with the familiar QT API. Here's a code snippit of the "Application" example:
/****************************************************************************
**
** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
**
** This file is part of Qt Jambi.
**
** $JAVA_LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
package com.trolltech.examples;
import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;
private String curFile;
private String rsrcPath = "classpath:com/trolltech/images";
public Application()
{
setMenuBar(menuBar);
setWindowIcon
(new QIcon("classpath:com/trolltech/images/logo_32.png"));
setCentralWidget(textEdit);
try {
createActions();
} catch (Exception e) {
e.printStackTrace();
}
createMenus();
createToolBars();
createStatusBar();
readSettings();
textEdit.document().contentsChanged.connect(this, "documentWasModified()");
setCurrentFile("");
}
/****************************************************************************
**
** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
**
** This file is part of Qt Jambi.
**
** $JAVA_LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
package com.trolltech.examples;
import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;
public class Application extends QMainWindow {
private String curFile;
private QTextEdit textEdit;
private QMenu fileMenu;
private QMenu editMenu;
private QMenu helpMenu;
private QToolBar fileToolBar;
private QToolBar editToolBar;
private QAction newAct;
private QAction openAct;
private QAction saveAct;
private QAction saveAsAct;
private QAction exitAct;
private QAction cutAct;
private QAction copyAct;
private QAction pasteAct;
private QAction aboutAct;
private QAction aboutQtAct;
private String rsrcPath = "classpath:com/trolltech/images";
public Application()
{
QMenuBar menuBar = new QMenuBar();
setMenuBar(menuBar);
setWindowIcon(new QIcon("classpath:com/trolltech/images/logo_32.png"));
textEdit = new QTextEdit();
setCentralWidget(textEdit);
try {
createActions();
} catch (Exception e) {
e.printStackTrace();
}
createMenus();
createToolBars();
createStatusBar();
readSettings();
textEdit.document().contentsChanged.connect(this, "documentWasModified()");
setCurrentFile("");
}
To copy to clipboard, switch view to plain text mode
I'm going to re-write my Homestead QT/C++ app in Jambi just to see how it sizes up. My boss is really excited about it because he favors Java over C++ and I'm the only pgmr who uses C++ in our dept and I'll be retiring in about two years.
Bookmarks