Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Performance of QtWebEngine is very poor when loading google maps

Performance of QtWebEngine is very poor when loading google maps

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 3 Posters 641 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.
  • H Offline
    H Offline
    Huy Nguyen
    wrote on last edited by Huy Nguyen
    #1

    Hi all
    I make a simple app just display Google maps on Qt using WebEngine. So i create a HTML file and use Google Maps Javascript API to display maps.
    But the problem is the performance is very poor, lag occur when i drag / drop/ zoom in / zoom out.

    I tried changing the WebEngine url to "https://www.google.com/maps/" and the lag doesn't happen anymore. I don't understand where the problem?

    Note: I built in release mode

    This is my HTML file:

    <!DOCTYPE html>
    <html>
    
    <head>
        <title>Google Maps Example</title>
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    
    <body>
        <div id="map-container">
            <div id="map"></div>
        </div>
    
        <br>
            <script async
                src="https://maps.googleapis.com/maps/api/js?v=3.54&key=myAPIKey&language=ja&callback=initMap">
            </script>
            <script src="index.js"></script>
        <br>
    </body>
    </html>
    

    This is my WebEngineView:

        WebEngineView {
            id: webview
            anchors.fill: parent
            webChannel: myWebChannel
            settings.javascriptEnabled: true
            // url: "index.html"
            url: "https://www.google.com/maps/"
    
            profile {
                httpCacheType: WebEngineProfile.DiskHttpCache
                persistentCookiesPolicy: WebEngineProfile.ForcePersistentCookies
            }
    
            settings {
                autoLoadImages: true
                dnsPrefetchEnabled: false
                accelerated2dCanvasEnabled: true
                javascriptEnabled: true
                webGLEnabled:true
                pdfViewerEnabled: false
            }
    }
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      ShaunaB1
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • T Offline
        T Offline
        thomas642daniel
        wrote on last edited by thomas642daniel
        #3
        This post is deleted!
        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