|
|
Hi,
I do not appreciate you shouting at me when I am trying to help you. Keep
your exclamation marks in check please, or if it was due to a broken
keyboard, get a new one.
I am using the same documentation you do. If something is not 100% clear
from the documentation, try some experimentation. Did you actually try
running the code I send you? Did you watch what happened on the stdout /
windows console / debug output?
If you missed it, try putting something of more consequence than just a
debug statement in TestObj's setData method. Try showing a QMessagebox from
there.
You can just comment out the most important bits of the code I send you, but
then obviously it will not do a lot for you anymore. Nice to have a java
script popup, but I thought you wanted to have access to your DOM from your
C++ program (and thus get some data from the dom into your program?) In that
case you really do have to do more than a javascript alert().
Also, note the remarks in the documentation on the
addToJavaScriptWindowObject: I am not doing that the way you should... It
works, but it only works while the main frame of your frame does not change.
I'll leave fixing that as an exercise to the reader ;-)
André
"medi m" <medi.185@xxxxxxxxx> schreef in bericht
news:f575734e0806100239h2aff546xfab1f9464dc8f266@xxxxxxxxxxxxxxxxx
thank's André
I did read the documentation on addToJavaScriptWindowObject but it is not
detail,
I think that the explacation of addToJavaScriptWindowObject on the site
http://doc.trolltech.com/4.4/qwebframe.html # addToJavaScriptWindowObject is
very short (we can understand a function in just two
words!!!!!!!!!!!!!!!!!!),
brief
I was put this part as comment:
/*if (!m_dataObject) {
m_dataObject = new TestObj();
f->addToJavaScriptWindowObject("dataOutput", m_dataObject);
}*/
and i change script like this:
var anchorList = document.getElementsByTagName("a") ;
alert(anchorList[1].href);
Please I want to know What's the role of addToJavaScriptWindowObject
function? If it is possible I want to know what it make exactly!!
Cheers.
Sanaa
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|