diff --git a/nodz_main.py b/nodz_main.py index 1c54147..24b1355 100644 --- a/nodz_main.py +++ b/nodz_main.py @@ -80,10 +80,16 @@ def wheelEvent(self, event): inFactor = 1.15 outFactor = 1 / inFactor - if event.delta() > 0: - zoomFactor = inFactor - else: - zoomFactor = outFactor + try: + if event.delta() > 0: + zoomFactor = inFactor + else: + zoomFactor = outFactor + except AttributeError: + if event.angleDelta().y() > 0: + zoomFactor = inFactor + else: + zoomFactor = outFactor self.scale(zoomFactor, zoomFactor) self.currentState = 'DEFAULT'