[commonqt-devel] How to invoke Qt methods on Strings/QStrings?
Olaf Merkert
olaf at m-merkert.de
Wed Mar 23 16:15:30 UTC 2011
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")
but I just get
class not found: QString
[Condition of type SIMPLE-ERROR]
And originally, the context for the call to contains was something like this:
(#_contains (#_data (#_sourceModel model) index0)
(#_filterRegExp model))
In my mental model, the actual data in the sourceModel should have been a
QString, because it was part of a Qt datastructure -- or am I wrong about
this?
But it will automatically be converted to a native lisp string?
I'm not sure here, because I put lisp strings into the datastructure (see
attachment of my previous question) using setData.
Ultimately, it is probably wiser to just use lisp libraries for these model
level things.
Thanks for your fast answer,
Olaf Merkert
More information about the commonqt-devel
mailing list