[PyQt] QWebView, Google Maps issue on Windows.

Kel Solaar kelsolaar_fool at hotmail.com
Sun Jan 9 17:07:29 GMT 2011


Hello,I upgraded recently to PyQt 4.8.2 and noticed that a widget of my application displaying Google Map into a QWebView is not working anymore on Windows : I can't Pan or use the Mouse Scrollwheel.I was previously using 4.7.3 and had no particular issue.I would like to add also that the same 4.8.2 release is fine on OSX.Here is a small snippet to illustrate the problem :
import sysfrom PyQt4.QtCore import *from PyQt4.QtGui import *from PyQt4.QtWebKit import *
class WebPage(QWidget):
	def __init__(self):		QWidget.__init__(self)				self.setWindowTitle("HTML Page")				gridLayout = QGridLayout()						map = QWebView()		map.load( QUrl( "http://thomasmansencal.com/Sharing/Others/Google_Maps.html" ) )		gridLayout.addWidget( map )			self.setLayout(gridLayout)
app = QApplication(sys.argv)webPage = WebPage()webPage.show()sys.exit(app.exec_())
and the code of the html file :
<html>    <head>        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">        </script>        <script type="text/javascript">            var map;            var markers = [];            var defaultLocation = new google.maps.LatLng(50, 0);            var defaultZoomLevel = 2                        function initialize()            {            	var myOptions =             	{            		zoom: defaultZoomLevel,            		center: defaultLocation,            		disableDefaultUI: true,            		mapTypeId: google.maps.MapTypeId.ROADMAP            	};            	map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);            }        </script>    </head>    <body onload="initialize()">        <div id="map_canvas" style="width:100%; height:100%">        </div>    </body></html>
Can someone confirm he has also a problem with this snippet and PyQt 4.8.2 ?
Thanks,
Thomas 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110109/5d8d02e2/attachment.html>


More information about the PyQt mailing list