QWebKit problem with google maps api v3
-
When I visit "this ":https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simplewebpage, which is a simple map from google maps with ,for example chrome or firefox everything is natural. You can double click to zoom in, you can drag the map and you can drag the street view mode icon. But when this web page loaded into a QWebView object with the following code, I don't have mouse dragging ability . So for example I can't drag the map to change the center of the map.
@QWebView view;
view.setUrl(QUrl("https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple"));
view.show();@
Any solution ? -
I have no solution to offer, but this problem has been around for a while. See "this thread":http://qt-project.org/forums/viewthread/1643/.
The solutions offered in that thread worked for me until recently, but now I can't find any solution that works.
-
This still works for me (Qt 4.8.2, Linux):
QCoreApplication* theApplication = QCoreApplication::instance();
theApplication->setApplicationName( "chrome" );
theApplication->setApplicationVersion( "1.0" ); -
Brilliant! That works for me (PyQt 4.9.1, qt 4.8.1, openSUSE Linux) but only if I remove the previous attempted solution of replacing QWebPage's userAgentForUrl method.
-
Working with qt 4.8.1 under windows too
Thanks I did read lots of stuff before it worked :D