2013-12-05 14:16:09 +00:00
|
|
|
"""
|
|
|
|
This module contains a child class of QWebView in order to reimplement the wheelEvent event handler.
|
|
|
|
"""
|
2018-07-24 05:50:27 +00:00
|
|
|
from PyQt5 import QtCore, QtWebKitWidgets
|
2013-12-05 14:16:09 +00:00
|
|
|
|
2013-12-10 12:55:20 +00:00
|
|
|
|
2018-07-24 05:50:27 +00:00
|
|
|
class CWebView(QtWebKitWidgets.QWebView):
|
2013-12-05 14:16:09 +00:00
|
|
|
"""
|
|
|
|
This is a reimplementation of QWebView in order to override the wheelEvent method.
|
|
|
|
"""
|
2014-04-04 14:04:10 +00:00
|
|
|
scrolled = QtCore.pyqtSignal()
|
2013-12-05 14:16:09 +00:00
|
|
|
|
|
|
|
def wheelEvent(self, event):
|
2014-04-04 14:04:10 +00:00
|
|
|
self.scrolled.emit()
|
2018-07-24 05:50:27 +00:00
|
|
|
super().wheelEvent(event)
|