[Interest] Change modifier for horizontal scrolling with mousewheel
Sean Murphy
Sean.M.Murphy at us.kbr.com
Fri May 20 17:26:15 CEST 2022
The subject mostly says it all - is there a way to change the modifier used to allow horizontal scrolling with mousewheel?
By default it appears that Alt + mousewheel in a QScrollArea (and QGraphicsView, etc.) scrolls horizontally, but I have a user that wants that to be Shift + mouse wheel instead... Fine, I'll add some settings in my Options dialog to allow users to customize which key modifiers do what, but then I need to make it happen.
I think I can accomplish this by adding an event filter. The issue I see is that the existing Alt + mousewheel behaves just like I want - scroll direction sense is the way I want it, scroll size seems sensible for a single mouse wheel bump, and I don't see anywhere in the API where I can query what that scroll step size is to duplicate it.
Any tips/tricks? Ideally, could I just trap the users actual event, but then turn around and send an Alt+mousewheel event to the widget? That way I get the default scrolling behavior, but I'm just inserting a custom modifier layer over the top?
Sean
This e-mail, including any attached files, may contain confidential information, privileged information and/or trade secrets for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
More information about the Interest
mailing list