--- a/WebBrowser/WebBrowserView.py Sat Oct 21 19:17:27 2017 +0200 +++ b/WebBrowser/WebBrowserView.py Sat Oct 21 19:22:16 2017 +0200 @@ -362,9 +362,10 @@ """ Public slot to clear the current selection. """ - if qVersionTuple() >= (5, 7, 0): + try: self.triggerPageAction(QWebEnginePage.Unselect) - else: + except AttributeError: + # prior to 5.7.0 self.page().runJavaScript( "window.getSelection().empty()", WebBrowserPage.SafeJsWorld) @@ -545,7 +546,7 @@ @type WebHitTestResult """ spellCheckActionCount = 0 - if qVersionTuple() >= (5, 7, 0): + if qVersionTuple() >= (5, 7, 0) and PYQT_VERSION >= 0x50700: contextMenuData = self.page().contextMenuData() hitTest.updateWithContextMenuData(contextMenuData)