lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

in the past months I used some of my spare time to make Qt bindings
for Lua. I now have a working simple program to show how far I've got,
and a little screencast showing off some capabilities.

The program is here:
http://linuz.sns.it/~iazzi/lqtutorial.tar.gz

The screencast is here:
http://linuz.sns.it/~iazzi/tutorial.ogg

To compile use
qmake
make
./lqtutorial

Users of Debian-based systems should be fine using the
lqtutorial.pro.debian file.

The bindings are autogenerated using the output ogf GCCXML. I included
the bindings for just a few basic classes. I will try and package the
generator in a few days. The generator is written in less than 1000
lines of Lua code, and makes use of the Expat library for parsing XML.

Among the best hings there is the fact that I did not have to touch
any generated file by hand. They just worked.

Moreover, they are completely modular, so that I can have the bindings
for only few classes that I actually need. This provides a lot of
modularity, which could be exploited to make very small programs.

Finally, the generator has only be used on Qt, but is totally generic,
and can be used on any C++ code, although I don't know how well it
would understand some complex features of C++ (as deeply nested local
classes, barbaric use of templates and such).

I strongly hope that this is of some interest to someone.
Cheers,

mauro