[Qt-interest] Unable to load Google maps in Qt widgets through QWebview and evaluateJavaScript function
Anisha Kaul
born.rebel.83 at gmail.com
Fri May 27 08:26:36 CEST 2011
I have identified the problem this time. There is a flaw in the way I am
passing the Javascript code to the evaluatejavascript func. of QWebView.
Using Google maps's API, when I click a pushButton attached to the slot
holding the below code
this->page()->mainFrame()->evaluateJavaScript (QString ("Open(%1,2)").arg (
point.x ()).arg (point.y ()) );
the map pertaining to the location in question gets displayed.
Now if I want to add a marker to a particular coordinate, I do:
this->page()->mainFrame()->evaluateJavaScript (QString ("addMarker
(%1, %2)").arg (point.x ()).arg (point.y ()) );
This code doesn't execute. Any ideas?
Besides this, what is the way to add a *user defined* function to *
evaluateJavaScript* for evaluation?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110527/a54b6e08/attachment.html
More information about the Qt-interest-old
mailing list