Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Side scroll request in the wheelEvent with the shift modifier in qt5 mode [WIP] #1472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kokika
Copy link

@Kokika Kokika commented Aug 4, 2024

This is fix for QT5.
Convient function for side scrolling on canvas with shift modifier. This idea copied other program behavior.

@Kokika Kokika changed the title Side scroll request in the wheelEvent with the shift modifier Fix Side scroll request in the wheelEvent with the shift modifier in qt5 mode Aug 7, 2024
@wkentaro wkentaro self-assigned this Oct 3, 2024
@wkentaro
Copy link
Owner

wkentaro commented Oct 3, 2024

@Kokika looks like qt5 ev.angleDelta() handles it automatically. (I confirmed on my macOS + PyQt5)

https://doc.qt.io/qt-5/qwheelevent.html

image

@Kokika
Copy link
Author

Kokika commented Oct 3, 2024

@wkentaro I am testing on Ubuntu 24.04 with PyQt5 5.15.9 and here it isn't handles it automatically.

@wkentaro
Copy link
Owner

wkentaro commented Oct 3, 2024

I see, but your change breaks the other systems where qt5 automatically flips the order (because you flip again), so I can't merge.

We need to understand why qt5 won't work for you.

@Kokika
Copy link
Author

Kokika commented Oct 3, 2024

I realized it and I totally agree. I am searching the reason.

@Kokika Kokika changed the title Fix Side scroll request in the wheelEvent with the shift modifier in qt5 mode Fix Side scroll request in the wheelEvent with the shift modifier in qt5 mode [WIP] Oct 3, 2024
@Kokika
Copy link
Author

Kokika commented Oct 3, 2024

@wkentaro Could you test it if the shift modifier is in mods? Or maybe it is applied and take away from the mods on Mac os?

@wkentaro
Copy link
Owner

wkentaro commented Oct 4, 2024

@Kokika I tested on my Linux machine, and reproduced your phenomenon.

And on macOS, shift modifier is in mods (so your change makes it both horizontal scroll regardless of shift press).

Probably we need to add if-block for platform...

@Kokika
Copy link
Author

Kokika commented Oct 4, 2024

I tested this on Windows and same like Linux, so it is also need.

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