Helpviewer/HelpBrowserWV.py

changeset 3778
0c5bc18da740
parent 3776
ccb6eacb50e5
child 3788
195dd519bf29
equal deleted inserted replaced
3777:0c47cbb5b199 3778:0c5bc18da740
1724 """ 1724 """
1725 Protected method to handle wheel events. 1725 Protected method to handle wheel events.
1726 1726
1727 @param evt reference to the wheel event (QWheelEvent) 1727 @param evt reference to the wheel event (QWheelEvent)
1728 """ 1728 """
1729 if qVersion() >= "5.0.0":
1730 delta = evt.angleDelta().y()
1731 else:
1732 delta = evt.delta()
1729 if evt.modifiers() & Qt.ControlModifier: 1733 if evt.modifiers() & Qt.ControlModifier:
1730 if evt.angleDelta().y() < 0: 1734 if delta < 0:
1731 self.zoomOut() 1735 self.zoomOut()
1732 else: 1736 else:
1733 self.zoomIn() 1737 self.zoomIn()
1734 evt.accept() 1738 evt.accept()
1735 return 1739 return
1736 1740
1737 if evt.modifiers() & Qt.ShiftModifier: 1741 if evt.modifiers() & Qt.ShiftModifier:
1738 if evt.angleDelta().y() < 0: 1742 if delta < 0:
1739 self.backward() 1743 self.backward()
1740 else: 1744 else:
1741 self.forward() 1745 self.forward()
1742 evt.accept() 1746 evt.accept()
1743 return 1747 return

eric ide

mercurial