Friday, 18 July 2008

Qt/Lisp: looking for feedback

Update: You can download the generated code from here.

The tubes were down this morning, so I managed to get up to tutorial 6 in my Qt/Lisp API. It covers about 95% of the API by design so most of the non-extension tutorials/examples should work.



I would like to hear your complaints, suggestions, feedback if you have any.

Note that this API is a first draft and I thought it better to have something out there than wait until everything is perfect.

To start with, my current complaints:

  • (in-package :qt) -> Nothing is actually exported from the package yet :-)

  • (make-instance 'qstring ...) -> A really verbose way to pass a string! Should convert lisp strings to qstrings automagically.

  • Naming: instead of qpush-button, q:push-button

  • No way to extend Qt from within Lisp yet (tutorial 7 won't work)

  • No way to attach arbitrary functions as slots

  • Not Lispy enough.



I expect to address most of these at some point though the "Not Lispy enough" complaint is a bit subjective.

4 comments:

Anonymous said...

actually i find this pretty usefull. However I'm not able to generate the .so on my debian (stable) with sbcl (1.0.16) and qt4 libraries.

Do you have any hints?

Sohail Somani said...

What is the problem you are having? You might need to install the qt4-dev package.

Luís said...

Nice. How did you build qt_wrap.cxx?

Sohail Somani said...

Luis,

I used a patched version of SWIG. However, SWIG can't handle Qt headers by itself so I had to generate the SWIG input by some other dubious means :-)