152 self.__page.quotaRequested.connect(self.__quotaRequested) |
152 self.__page.quotaRequested.connect(self.__quotaRequested) |
153 # The registerProtocolHandlerRequested signal is handled in |
153 # The registerProtocolHandlerRequested signal is handled in |
154 # WebBrowserPage. |
154 # WebBrowserPage. |
155 self.__page.selectClientCertificate.connect( |
155 self.__page.selectClientCertificate.connect( |
156 self.__selectClientCertificate) |
156 self.__selectClientCertificate) |
157 with contextlib.suppress(AttributeError, ImportError): |
157 self.__page.findTextFinished.connect(self.__findTextFinished) |
158 #- Qt >= 5.14 |
|
159 from PyQt6.QtWebEngineCore import QWebEngineFindTextResult |
|
160 # __IGNORE_WARNING__ |
|
161 |
|
162 self.__page.findTextFinished.connect( |
|
163 self.__findTextFinished) |
|
164 |
158 |
165 def __setRwhvqt(self): |
159 def __setRwhvqt(self): |
166 """ |
160 """ |
167 Private slot to set widget that receives input events. |
161 Private slot to set widget that receives input events. |
168 """ |
162 """ |
1503 |
1495 |
1504 def _gestureEvent(self, evt): |
1496 def _gestureEvent(self, evt): |
1505 """ |
1497 """ |
1506 Protected method handling gesture events. |
1498 Protected method handling gesture events. |
1507 |
1499 |
1508 @param evt reference to the gesture event (QGestureEvent |
1500 @param evt reference to the gesture event |
|
1501 @type QGestureEvent |
1509 """ |
1502 """ |
1510 pinch = evt.gesture(Qt.GestureType.PinchGesture) |
1503 pinch = evt.gesture(Qt.GestureType.PinchGesture) |
1511 if pinch: |
1504 if pinch: |
1512 if pinch.state() == Qt.GestureState.GestureStarted: |
1505 if pinch.state() == Qt.GestureState.GestureStarted: |
1513 pinch.setTotalScaleFactor(self.__currentZoom / 100.0) |
1506 pinch.setTotalScaleFactor(self.__currentZoom / 100.0) |