Performance of QtWebEngine is very poor when loading google maps
Unsolved
QtWebEngine
-
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 } }
-
This post is deleted!