我正在用 Python 和 PyQt5 制作一个网络浏览器,我想在我的网络浏览器中启用 allowGeolocationOnInsecureOrigins,这样我就可以通过 Google Geo Location API 访问用户位置。
代码
self.browser = QWebEngineView()
self.browser.allowGeolocationOnInsecureOrigins(1)
错误
self.browser.allowGeolocationOnInsecureOrigins(1)
AttributeError: 'QWebEngineView' object has no attribute 'allowGeolocationOnInsecureOrigins'