eric7/WebBrowser/Tools/WebBrowserTools.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8553
10d31e5ce9e5
equal deleted inserted replaced
8316:0c7a44af84bc 8318:962bce857696
9 9
10 import os 10 import os
11 import re 11 import re
12 import mimetypes 12 import mimetypes
13 13
14 from PyQt5.QtCore import ( 14 from PyQt6.QtCore import (
15 QFile, QByteArray, QUrl, QCoreApplication, QBuffer, QIODevice 15 QFile, QByteArray, QUrl, QCoreApplication, QBuffer, QIODevice
16 ) 16 )
17 from PyQt5.QtGui import QPixmap 17 from PyQt6.QtGui import QPixmap
18 18
19 19
20 WebBrowserDataDirectory = { 20 WebBrowserDataDirectory = {
21 "html": os.path.join(os.path.dirname(__file__), "..", "data", "html"), 21 "html": os.path.join(os.path.dirname(__file__), "..", "data", "html"),
22 "icons": os.path.join(os.path.dirname(__file__), "..", "data", "icons"), 22 "icons": os.path.join(os.path.dirname(__file__), "..", "data", "icons"),
232 agent string. 232 agent string.
233 233
234 @return tuple containing the Chrome version and the QtWebEngine version 234 @return tuple containing the Chrome version and the QtWebEngine version
235 @rtype tuple of str 235 @rtype tuple of str
236 """ 236 """
237 from PyQt5.QtWebEngineWidgets import QWebEngineProfile 237 from PyQt6.QtWebEngineWidgets import QWebEngineProfile
238 238
239 useragent = QWebEngineProfile.defaultProfile().httpUserAgent() 239 useragent = QWebEngineProfile.defaultProfile().httpUserAgent()
240 match = re.search(r"""Chrome/([\d.]+)""", useragent) 240 match = re.search(r"""Chrome/([\d.]+)""", useragent)
241 chromeVersion = ( 241 chromeVersion = (
242 match.group(1) 242 match.group(1)

eric ide

mercurial