Another place that needed fixing for the scroll event phase change in Qt 5.7

This commit is contained in:
Kovid Goyal 2016-07-13 08:48:41 +05:30
parent 57c3a2d6af
commit 4371f8582e

View File

@ -982,7 +982,8 @@ class GridView(QListView):
return super(GridView, self).selectionCommand(index, event)
def wheelEvent(self, ev):
if ev.phase() != Qt.ScrollUpdate:
if ev.phase() not in (Qt.ScrollUpdate, 0):
# 0 is Qt.NoScrollPhase which is not yet available in PyQt
return
number_of_pixels = ev.pixelDelta()
number_of_degrees = ev.angleDelta() / 8