lua-users home
lua-l archive

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

Just to add a few comments to Peter's.
lqt is quite complete, but we need complex use cases. I have little
time to develop one myself. If anyone can provide us with feedback it
would be very useful for us.

Deriving from Qt classes is as simple as
w = QWidget()
function w:mouseEvent(e)
 -- code

Almost every public function in the Qt manual should be present in the
bindings (automatic, so I do not really know) so that one is the main
reference you need. Conversion between arguments should be immediate.
The bindings automatically choose the version of a function that
matches the given parameters, eventually making use of default values.

non static methods are called with the colon syntax (or with an
explicit self argument).
adding a slot is done with

w:__addmethod(classname, signature, func)

test/t7.lua is the corresponding example. You can also see a simple
example using webkit in the same folder.

> One of the drawbacks of multi-platform UI toolkits is their bulk. Can you
> tell us the size(s) the lqt library(ies) on the three platforms?

on linux the stripped modules (not including qt objects) are:


The biggest one is obviously the gui part. As you can notice the size
is almost the same of the original shared objects. Not surprising,
since mainly we have to generate boilerplate code for each class in
the api. I don't know the sizes on windows or OSX.
You also have to consider that a bunch of things are stored in the Lua
register, which leads to bigger memory consumption. Should not be an
issue on a modern desktop though.

Alexandre, is there any public source of libqtlua?
I did start a lua plugin for Kross, the new scripting system of KDE,
which in turn is compatible with QtScript. There are a few pieces
still missing. If I find time to finish that, it will allow for lua
scripting in applications like the KOffice suite and hopefully Amarok.
The code is in the KDE repository, in playground/bindings/kloss.
Since the two frameworks are similar it would be interesting to see
how you solved some of the problems I had.