JaWeilBaum / pyqtlet2

pyqtlet2 extends pyqtlet which initially brought Leaflet maps to PyQt5 and PySide6.
Other
37 stars 19 forks source link

Tiles download in recent QtWebEngine versions #62

Open GAcherQuaze opened 8 months ago

GAcherQuaze commented 8 months ago

Recent versions of QtWebEngine have stricter policies when it comes to accessing remote content. As it stands, tiles don't load. The fix would be to add in the MapWidget constructor : self._page.settings().setAttribute(QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls,True) Hope that helps

CyBobber commented 7 months ago

Dear GAcherQuaze

Thanky you very much for this information! That helps a lot. I had the same problem after migrated my code from pyqtlet to pyqtlet2 and PyQt6. Now it works again. 🙂