Bind Aid

Announcing a new project on Trolltech Labs: Qt Script Generator. It's a tool that generates Qt bindings for Qt Script. Finally your scripts can go "new QPoint()" without you having to manually bind the world first! You not only get the Qt API, but also the possibility to "subclass" in script code, e.g.:

var w = new QWidget();
w.keyPressEvent = function(e) { print(e.key()); }
w.paintEvent = function(e) { ... }

To use the bindings in your own app, you just compile the bindings plugins, put them in your library path and then go like this:

QScriptEngine eng;
// also available: qt.sql, qt.xml, qt.svg,, qt.opengl

Have a look at the examples to get an idea of what you can do. More examples to come.

The generator itself is essentially the Qt Jambi generator with a Qt Script backend. (Great job, Jambi guys!)

Although this project is still very young, we're interested in hearing about any issues (functionality / performance / whatever) you have with the bindings. Have fun!

Blog Topics: