QtScript handling callback functions with QScriptValue

Aaron J. Seigo aseigo at kde.org
Thu May 20 21:30:13 CEST 2010


On May 20, 2010, Nikhil Marathe wrote:
>     void addEventListener(const QString &name, const QScriptValue
> &function);
> 
> implying that QScriptValue is used to 'collect' a function definition
> (a callback) in the C++<->QtScript bridge. But when I am trying my own
> code with something similar, my function is not called.
> 
> The script engine throws an exception that "unknown type `QScriptValue'"

you're not being specific enough for me to be able to be helpful, i'm afraid.

what does your javascript look like that is creating this exception?
what does your implementation of addEventListener look like in the C++?
how are you exporting addEventListener into the QtScript runtime?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100520/b9662426/attachment.sig 


More information about the Plasma-devel mailing list