Skip to content

Conversation

@jchv
Copy link
Contributor

@jchv jchv commented Sep 1, 2025

The orientation() and delta() methods of QWheelEvent were deprecated in Qt 5.0 in favor of angleDelta(), which expresses higher-fidelity data for devices like trackpads. In order to keep the behavior 100% identical, the code used to calculate the orientation() and delta() values in Qt 5.15 is inlined instead. That logic can be seen here:

https://github.com/qt/qtbase/blob/v5.15.17-lts-lgpl/src/gui/kernel/qevent.cpp#L876-L884

Following this logic, we also break the tie for orientation in favor of vertical scrolling.

Since there is no actual HexEdit usage in bsnes, I tested it by putting a dummy HexEdit widget inside the bsnes Presentation window. Scrolling seemed to work as expected.

The orientation() and delta() methods of QWheelEvent were deprecated in
Qt 5.0 in favor of angleDelta(), which expresses higher-fidelity data
for devices like trackpads. In order to keep the behavior 100%
identical, the code used to calculate the orientation() and delta()
values in Qt 5.15 is inlined instead. That logic can be seen here:

https://github.com/qt/qtbase/blob/v5.15.17-lts-lgpl/src/gui/kernel/qevent.cpp#L876-L884

Following this logic, we also break the tie for orientation in favor of
vertical scrolling.

Since there is no actual HexEdit usage in bsnes, I tested it by putting
a dummy HexEdit widget inside the bsnes Presentation window. Scrolling
seemed to work as expected.
@jchv jchv mentioned this pull request Sep 1, 2025
@Screwtapello Screwtapello merged commit 88de1f1 into bsnes-emu:master Sep 1, 2025
4 of 5 checks passed
@jchv jchv deleted the hiro-qt-deprecated-wheel-delta-orientation branch September 2, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants