OpenLayers Geolocation in PyQt 5.9

后端 未结 2 1812
春和景丽
春和景丽 2020-12-12 02:46

I\'ve implemented a Website with a geolocation function and Button.

This Webpage gets displayed fine in a QwebEngineView (OSM Map too). The Webpage is loaded

2条回答
  •  执笔经年
    2020-12-12 03:15

    Adding the following lines solved my Problems:

        self.ui.w3View.page().featurePermissionRequested.connect(self.permissionRequested)
    
    def permissionRequested(self, frame, feature):
        self.ui.w3View.page().setFeaturePermission(frame, feature, QtWebEngineWidgets.QWebEnginePage.PermissionGrantedByUser)
    

    Found it in this post and editing it to PyQt 5.9.

提交回复
热议问题