QWheelEvent.orientation() is obsolete, used angleDelta() instead

This commit is contained in:
Dmitri Bogomolov 2018-03-01 17:40:13 +02:00
parent 376783603a
commit 26e2c211c8
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -45,9 +45,9 @@ class MessageView(QtWidgets.QTextBrowser):
# super will actually automatically take care of zooming
super(MessageView, self).wheelEvent(event)
if (
(QtWidgets.QApplication.queryKeyboardModifiers()
& QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
and event.orientation() == QtCore.Qt.Vertical
(QtWidgets.QApplication.queryKeyboardModifiers()
& QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
and event.angleDelta().y() != 0
):
zoom = self.currentFont().pointSize() * 100 / self.defaultFontPointSize
QtWidgets.QApplication.activeWindow().statusbar.showMessage(