[Qt-interest] Invoke function in JavaScript

noam.rosenthal at nokia.com noam.rosenthal at nokia.com
Wed Dec 15 07:01:46 CET 2010


>-----Original Message-----
>From: ext Joshua Lee [mailto:muzili at gmail.com]
>Sent: Tuesday, December 14, 2010 7:56 PM
>To: Rosenthal Noam (Nokia-MS-Qt/RedwoodCity)
>Cc: mars.leezm at gmail.com; qt-interest at trolltech.com
>Subject: Re: [Qt-interest] Invoke function in JavaScript
>
>Hi No'am,
>I want pass C++ value to javascript function 'foobar',
>how to get it?
>
You convert it into a QScriptValue, e.g. by wrapping it in a QVariant (http://doc.trolltech.com/4.7/qscriptengine.html#newVariant)

I suggest some light reading: http://doc.trolltech.com/4.7/scripting.html
It's all there :)

No'am




More information about the Qt-interest-old mailing list