QWheelEvent::orientation() replaced with angleDelta()?
-
http://doc.qt.io/qt-5/qwheelevent-obsolete.html#orientation says to replace orientation() with angleDelat().
But the 2 functions are for different things. orientation() returns what direction the scroll wheel is rotated in. For example on a mouse with tilting wheel, it returns horizontal when the wheel is tilted instead of rolled.
angleDelta() returns the angle the wheel has been rolled. Like is rolled for a whole circle.
I really don't see how one can replace the other. Am I missing something?
-
angleDelta()
returns a QPoint. The x part of the point indicates the horizontal angle and y vertical.
So if you want to tell the orientation check which of these is non-zero. -
@Chris-Kawa
Ah. I see. Thanks for the explanation. It makes sense now.