|
Hi,
There is some demonstration _javascript_ by default
in the text edit, right? Did you notice how it uses an object called
"dataObject", and a method called setData? Does that ring any bells?
Did you read the documentation on addToJavaScriptWindowObject?
André
|
|
|
|
Hello André, finally I can
run your code, thank you well. in fact it did not work for
me because I tested it in Linux and I have'nt connection,
that is why nothing has been posted :)
I have understand that this
instructions are used to apply the script written in
plaintextedit
QString script; script =
plainTextEdit->toPlainText(); QVariant v =
f->evaluateJavaScript(script);
But, I don't
understand this instructions:
if (!m_dataObject)
{ m_dataObject = new TestObj();
f->addToJavaScriptWindowObject("dataOutput",
m_dataObject); }
And the slot setData
serve for what, can you give me more explanation.
Regards. | |
|