Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QWebKit problem with google maps api v3
Forum Updated to NodeBB v4.3 + New Features

QWebKit problem with google maps api v3

Scheduled Pinned Locked Moved Qt WebKit
5 Posts 4 Posters 5.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    s4eed
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jim_easterbrook
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zyron72
        wrote on last edited by
        #3

        This still works for me (Qt 4.8.2, Linux):

        QCoreApplication* theApplication = QCoreApplication::instance();
        theApplication->setApplicationName( "chrome" );
        theApplication->setApplicationVersion( "1.0" );

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jim_easterbrook
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JulsPower
            wrote on last edited by
            #5

            Working with qt 4.8.1 under windows too
            Thanks I did read lots of stuff before it worked :D

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved