示例#1
0
    def acceptNavigationRequest(self, aUrl, aType, aIsMainFrame):
        print("{} {}".format(aType, aUrl))
        if aType == QWebEnginePage.NavigationTypeLinkClicked:
            print(aUrl)
            return False

        return QWebEnginePage.acceptNavigationRequest(self, aUrl, aType,
                                                      aIsMainFrame)
示例#2
0
 def acceptNavigationRequest(self, url, _type, isMainFrame):
     print("acceptNavigationRequest")
     print(url)
     return QWebEnginePage.acceptNavigationRequest(self, url, _type,
                                                   isMainFrame)