I need to evaluate a piece of JavaScript... (solved)
Hello,
I have a piece of Javascript code that I would like to evaluate from inside my Qt program.
I want to pass a QString into a the Javascript function and then get the result stored in a different QString.
I know there's an evaluateJavaScript function in QWebFrame, but using that doesn't seem right since I would need to pass in the whole script as the argument, concatenated with the call to the function I want to evaluate and the input which needs to be properly escaped (quotation marks, newlines, etc.)
Is there a better way to do that?
Thanks!
Re: I need to evaluate a piece of JavaScript...
I found a solution with QtScript here:
http://doc.trolltech.com/4.6/qscriptvalue.html#call
Sorry for the noise!