--- a/WebBrowser/WebBrowserPage.py Sun Feb 17 12:57:26 2019 +0100 +++ b/WebBrowser/WebBrowserPage.py Sun Feb 17 15:42:05 2019 +0100 @@ -550,22 +550,26 @@ ## Methods below implement protocol handler related functions ############################################################# - @pyqtSlot("QWebEngineRegisterProtocolHandlerRequest") - def __registerProtocolHandlerRequested(self, request): - """ - Private slot to handle the registration of a custom protocol handler. - - @param request reference to the registration request - @type QWebEngineRegisterProtocolHandlerRequest - """ - from PyQt5.QtWebEngineCore import \ - QWebEngineRegisterProtocolHandlerRequest - - if self.__registerProtocolHandlerRequest: - del self.__registerProtocolHandlerRequest - self.__registerProtocolHandlerRequest = None - self.__registerProtocolHandlerRequest = \ - QWebEngineRegisterProtocolHandlerRequest(request) + try: + @pyqtSlot("QWebEngineRegisterProtocolHandlerRequest") + def __registerProtocolHandlerRequested(self, request): + """ + Private slot to handle the registration of a custom protocol handler. + + @param request reference to the registration request + @type QWebEngineRegisterProtocolHandlerRequest + """ + from PyQt5.QtWebEngineCore import \ + QWebEngineRegisterProtocolHandlerRequest + + if self.__registerProtocolHandlerRequest: + del self.__registerProtocolHandlerRequest + self.__registerProtocolHandlerRequest = None + self.__registerProtocolHandlerRequest = \ + QWebEngineRegisterProtocolHandlerRequest(request) + except TypeError: + # this is supported with Qt 5.12 and later + pass def registerProtocolHandlerRequestUrl(self): """