WebBrowser/WebBrowserView.py

changeset 6839
4f6234f34dfd
parent 6797
d9e56b0aa7ac
child 6923
d062df8f1d9f
equal deleted inserted replaced
6838:cd9b76b2967a 6839:4f6234f34dfd
18 18
19 from PyQt5.QtCore import pyqtSignal, pyqtSlot, PYQT_VERSION, Qt, QUrl, \ 19 from PyQt5.QtCore import pyqtSignal, pyqtSlot, PYQT_VERSION, Qt, QUrl, \
20 QFileInfo, QTimer, QEvent, QPoint, QPointF, QDateTime, QStandardPaths, \ 20 QFileInfo, QTimer, QEvent, QPoint, QPointF, QDateTime, QStandardPaths, \
21 QByteArray, QIODevice, QDataStream 21 QByteArray, QIODevice, QDataStream
22 from PyQt5.QtGui import QDesktopServices, QClipboard, QIcon, \ 22 from PyQt5.QtGui import QDesktopServices, QClipboard, QIcon, \
23 QContextMenuEvent, QPixmap 23 QContextMenuEvent, QPixmap, QCursor
24 from PyQt5.QtWidgets import qApp, QStyle, QMenu, QApplication, QDialog 24 from PyQt5.QtWidgets import qApp, QStyle, QMenu, QApplication, QDialog
25 from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, \ 25 from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, \
26 QWebEngineDownloadItem 26 QWebEngineDownloadItem
27 27
28 from E5Gui import E5MessageBox, E5FileDialog 28 from E5Gui import E5MessageBox, E5FileDialog
1473 evt.accept() 1473 evt.accept()
1474 elif evt.key() == Qt.Key_M: 1474 elif evt.key() == Qt.Key_M:
1475 if evt.modifiers() & Qt.ControlModifier: 1475 if evt.modifiers() & Qt.ControlModifier:
1476 self.__muteMedia() 1476 self.__muteMedia()
1477 evt.accept() 1477 evt.accept()
1478 elif evt.key() == Qt.Key_Backspace:
1479 pos = QCursor.pos()
1480 pos = self.mapFromGlobal(pos)
1481 hitTest = self.page().hitTestContent(pos)
1482 if not hitTest.isContentEditable():
1483 self.pageAction(QWebEnginePage.Back).trigger()
1484 evt.accept()
1478 1485
1479 def _keyReleaseEvent(self, evt): 1486 def _keyReleaseEvent(self, evt):
1480 """ 1487 """
1481 Protected method called by a key release. 1488 Protected method called by a key release.
1482 1489

eric ide

mercurial