194 agent string. |
194 agent string. |
195 |
195 |
196 @return tuple containing the Chrome version and the QtWebEngine version |
196 @return tuple containing the Chrome version and the QtWebEngine version |
197 @rtype tuple of str |
197 @rtype tuple of str |
198 """ |
198 """ |
199 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
199 from PyQt5.QtWebEngineWidgets import QWebEngineProfile |
200 useragent = WebBrowserWindow.webProfile().defaultUserAgent |
200 |
|
201 useragent = QWebEngineProfile.defaultProfile().httpUserAgent() |
201 match = re.search(r"""Chrome/([\d.]+)""", useragent) |
202 match = re.search(r"""Chrome/([\d.]+)""", useragent) |
202 if match: |
203 if match: |
203 chromeVersion = match.group(1) |
204 chromeVersion = match.group(1) |
204 else: |
205 else: |
205 chromeVersion = QCoreApplication.translate( |
206 chromeVersion = QCoreApplication.translate( |