5 |
5 |
6 """ |
6 """ |
7 Module implementing tool functions for the web browser. |
7 Module implementing tool functions for the web browser. |
8 """ |
8 """ |
9 |
9 |
|
10 import mimetypes |
10 import os |
11 import os |
11 import re |
12 import re |
12 import mimetypes |
13 |
13 |
14 from PyQt6.QtCore import QBuffer, QByteArray, QCoreApplication, QIODevice, QUrl |
14 from PyQt6.QtCore import QByteArray, QUrl, QCoreApplication, QBuffer, QIODevice |
|
15 from PyQt6.QtGui import QPixmap |
15 from PyQt6.QtGui import QPixmap |
16 |
|
17 |
16 |
18 WebBrowserDataDirectory = { |
17 WebBrowserDataDirectory = { |
19 "html": os.path.join(os.path.dirname(__file__), "..", "data", "html"), |
18 "html": os.path.join(os.path.dirname(__file__), "..", "data", "html"), |
20 "icons": os.path.join(os.path.dirname(__file__), "..", "data", "icons"), |
19 "icons": os.path.join(os.path.dirname(__file__), "..", "data", "icons"), |
21 "js": os.path.join(os.path.dirname(__file__), "..", "data", "javascript"), |
20 "js": os.path.join(os.path.dirname(__file__), "..", "data", "javascript"), |
218 version and the QtWebEngine version |
217 version and the QtWebEngine version |
219 @rtype tuple of (str, str, str) |
218 @rtype tuple of (str, str, str) |
220 """ |
219 """ |
221 try: |
220 try: |
222 from PyQt6.QtWebEngineCore import ( |
221 from PyQt6.QtWebEngineCore import ( |
|
222 qWebEngineChromiumSecurityPatchVersion, |
|
223 qWebEngineChromiumVersion, |
223 qWebEngineVersion, |
224 qWebEngineVersion, |
224 qWebEngineChromiumVersion, |
|
225 qWebEngineChromiumSecurityPatchVersion, |
|
226 ) |
225 ) |
227 |
226 |
228 chromiumVersion = qWebEngineChromiumVersion() |
227 chromiumVersion = qWebEngineChromiumVersion() |
229 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion() |
228 chromiumSecurityVersion = qWebEngineChromiumSecurityPatchVersion() |
230 webengineVersion = qWebEngineVersion() |
229 webengineVersion = qWebEngineVersion() |