[fetter-devel] Qt bindings

Ivan Shvedunov ivan4th at gmail.com
Wed Nov 2 09:05:33 UTC 2005


Well, as a former big Qt fan I just couldn't help myself...

Concerning Qt bindings:
Qt headers aren't really using any non-standard C++. MOC directives disappear if
you pass the file in question via preprocessor (they are #defined as
blank or something
like "signals" -> "protected"), so no special handling is required.
What MOC really does
is scanning header files for such directives and then generating
additional C++ source
containing "metaobjects", which contain slot descriptions etc. The
data from metaobjects
can be accessed and used by Lisp binding to connect signals to slots
and other related
tasks.

Some additional ideas I had concerning Qt <-> Lisp interaction:

1. It's possible to generate XML-based .ui files easily from Lisp by
means of any
XML generator and then make Qt load them or convert them into C++ sources via
uic. This can be used to build GUI declaratively in Lisp.

2. It's relatively easy to build a library which can interact with Qt
code by means of
calling members declared as slots, and probably do so via some simple
RPC protocol -
this can be useful for (somewhat strange) cases where GUI code is written in C++
and application core is written in Lisp.

That said, I think a good stable native open source cross-platform
Lisp GUI libary would
be much better than Qt bindings ;-)



More information about the fetter-devel mailing list