I\'m trying to interact with a google map using python. I\'ve built an application in PyQT with a QWebView. The QWebView loads a local html page as shown here:
<
The error was that I needed to wait for the page to load. I added a button that was connected to the evaluateJavaScript("addMarker(-33.89,151.275)")
call. When I clicked the button (after the page loaded), the marker was added as expected.
http://pysnippet.blogspot.com/2010/01/more-fun-with-qwebkit.html might help.
The only difference I can see between the two things you tried is that alert() is part of the standard functions. Maybe you need a document.addmarker() instead of just addmarker() ?