[commonqt-devel] How to invoke Qt methods on Strings/QStrings?

David Lichteblau david at lichteblau.com
Wed Mar 23 16:46:19 UTC 2011


Quoting Olaf Merkert (olaf at m-merkert.de):
> Am Mittwoch 23 März 2011, 15:25:06 schrieb David Lichteblau:
> > But the instance on which a method is being called needs to be a C++
> > object.  So you need to make (and later free) a new QString explicitly
> > in this case.
> 
> That sounds reasonable to me.  I actually tried to use
> 
> (#_new QString "Hello")

OK.  I think I've been getting ahead of myself (or of the code) a little
with the #_new suggestion there.

It turns out that there was a qobject lisp type wrapping such a pointer
a long time ago, but it is commented out now, there's no marshalling
code for it anymore, and especially no dispatching code, which you would
need (and never has been)...

[...]
> Ultimately, it is probably wiser to just use lisp libraries for these model 
> level things.

At the moment, I think you're right.

As you can tell, I'm still more in "what do I want CommonQt APIs to look
like eventually" mode at the moment with my thinking, and not quite in
"how does it work today" mode.

Perhaps Stas has a better suggestion; at least ISTR that someone
actually worked with those models already.


d.




More information about the commonqt-devel mailing list