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

This commit is contained in:
Dmitri Bogomolov 2018-03-01 17:40:13 +02:00
parent 5f4b67a61e
commit acaa2743ef
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class MessageCompose(QtWidgets.QTextEdit):
if ( if (
(QtWidgets.QApplication.queryKeyboardModifiers() (QtWidgets.QApplication.queryKeyboardModifiers()
& QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier & QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
and event.orientation() == QtCore.Qt.Vertical and event.angleDelta().y() != 0
): ):
if event.delta() > 0: if event.delta() > 0:
self.zoomIn(1) self.zoomIn(1)

View File

@ -56,7 +56,7 @@ class MessageView(QtWidgets.QTextBrowser):
if ( if (
(QtWidgets.QApplication.queryKeyboardModifiers() (QtWidgets.QApplication.queryKeyboardModifiers()
& QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier & QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
and event.orientation() == QtCore.Qt.Vertical and event.angleDelta().y() != 0
): ):
zoom = self.currentFont().pointSize() * 100 / self.defaultFontPointSize zoom = self.currentFont().pointSize() * 100 / self.defaultFontPointSize
QtWidgets.QApplication.activeWindow().statusbar.showMessage( QtWidgets.QApplication.activeWindow().statusbar.showMessage(