Example #1
0
 def acceptNavigationRequest(self, url: QUrl,
                             _type: QWebEnginePage.NavigationType,
                             isMainFrame: bool) -> bool:
     if url.scheme() == "qrc":
         return True
     QDesktopServices.openUrl(url)
     return False
Example #2
0
 def acceptNavigationRequest(
     self,
     url: QUrl,
     navigation_type: QWebEnginePage.NavigationType,
     is_main_frame: bool,
 ) -> bool:
     if url.scheme() != "https":
         return True
     QDesktopServices.openUrl(url)
     return False