def wheel_delta(event):
 if PYQT4:
  delta = event.delta()
 else:
  angle = event.angleDelta()
  x = angle.x()
  y = angle.y()
  if (abs(x) > abs(y)):
   delta = x
  else:
   delta = y
 return delta

def wheel_delta ( event ) : if PYQT4 : delta = event . delta ( ) else : angle = event . angleDelta ( ) x = angle . x ( ) y = angle . y ( ) if ( abs ( x ) > abs ( y ) ) : delta = x else : delta = y return delta
return a single wheel delta .