6 |
6 |
7 """ |
7 """ |
8 Module implementing the helpbrowser using QWebView. |
8 Module implementing the helpbrowser using QWebView. |
9 """ |
9 """ |
10 |
10 |
11 from PyQt5.QtCore import ( |
11 from PyQt6.QtCore import ( |
12 pyqtSlot, pyqtSignal, QUrl, QUrlQuery, QTimer, QEventLoop, QPoint, QPointF, |
12 pyqtSlot, pyqtSignal, QUrl, QUrlQuery, QTimer, QEventLoop, QPoint, QPointF, |
13 QT_VERSION |
13 QT_VERSION |
14 ) |
14 ) |
15 from PyQt5.QtGui import QDesktopServices |
15 from PyQt6.QtGui import QDesktopServices |
16 from PyQt5.QtWebEngineWidgets import ( |
16 from PyQt6.QtWebEngineWidgets import ( |
17 QWebEnginePage, QWebEngineSettings, QWebEngineScript |
17 QWebEnginePage, QWebEngineSettings, QWebEngineScript |
18 ) |
18 ) |
19 try: |
19 try: |
20 from PyQt5.QtWebEngine import PYQT_WEBENGINE_VERSION |
20 from PyQt6.QtWebEngine import PYQT_WEBENGINE_VERSION |
21 # __IGNORE_EXCEPTION__ |
21 # __IGNORE_EXCEPTION__ |
22 except (AttributeError, ImportError): |
22 except (AttributeError, ImportError): |
23 PYQT_WEBENGINE_VERSION = QT_VERSION |
23 PYQT_WEBENGINE_VERSION = QT_VERSION |
24 from PyQt5.QtWebChannel import QWebChannel |
24 from PyQt6.QtWebChannel import QWebChannel |
25 |
25 |
26 try: |
26 try: |
27 from PyQt5.QtNetwork import QSslConfiguration, QSslCertificate |
27 from PyQt6.QtNetwork import QSslConfiguration, QSslCertificate |
28 SSL_AVAILABLE = True |
28 SSL_AVAILABLE = True |
29 except ImportError: |
29 except ImportError: |
30 SSL_AVAILABLE = False |
30 SSL_AVAILABLE = False |
31 |
31 |
32 from E5Gui import E5MessageBox |
32 from E5Gui import E5MessageBox |
581 handler. |
581 handler. |
582 |
582 |
583 @param request reference to the registration request |
583 @param request reference to the registration request |
584 @type QWebEngineRegisterProtocolHandlerRequest |
584 @type QWebEngineRegisterProtocolHandlerRequest |
585 """ |
585 """ |
586 from PyQt5.QtWebEngineCore import ( |
586 from PyQt6.QtWebEngineCore import ( |
587 QWebEngineRegisterProtocolHandlerRequest |
587 QWebEngineRegisterProtocolHandlerRequest |
588 ) |
588 ) |
589 |
589 |
590 if self.__registerProtocolHandlerRequest: |
590 if self.__registerProtocolHandlerRequest: |
591 del self.__registerProtocolHandlerRequest |
591 del self.__registerProtocolHandlerRequest |