You are not logged in.

#1 2023-01-22 14:42:10

Strangiato
Member
Registered: 2020-01-10
Posts: 521

How to invert the direction only of horizontal scrolling in Qt apps?

Hello

Currently, when I hover over the horizontal scroll bar of a Qt5/6 app and scroll up with the mouse wheel, the scroll bar is moved to the left, and when I scroll down the scroll bar is moved to the right.
I can change this behavior by activating the natural (inverted) scrolling in the mouse settings of KDE Plasma, but this changes the vertical scrolling too.
How can I only invert the horizontal scrolling?

Thanks for reading.

Last edited by Strangiato (2023-01-22 15:15:36)

Offline

#2 2023-01-22 15:12:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,149

Re: How to invert the direction only of horizontal scrolling in Qt apps?

Some universally loaded plugin (eg. a proxy style), but you'd have to write such thing.

Are you aware of https://man.archlinux.org/man/extra/xf8 … #Option~15 ?

Online

#3 2023-01-22 16:25:25

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: How to invert the direction only of horizontal scrolling in Qt apps?

Thanks.
From libinput documentation:
"On-button scrolling converts the motion of a device into scroll events while a designated button is held down."

I can already scroll horizontally by hovering over the horizontal scroll bar and moving the mouse while holding down the scroll wheel.
But I would like scrolling just by moving the mouse wheel.

Offline

#4 2023-01-22 16:28:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,149

Re: How to invert the direction only of horizontal scrolling in Qt apps?

The scroll button allows you to push a button (anywhere over the scrollable area) and move around your mouse to generate wheel events in any direction, not wheel, no scrollbar required.

Online

#5 2023-01-22 16:47:27

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: How to invert the direction only of horizontal scrolling in Qt apps?

There is a tip in the wiki:

https://wiki.archlinux.org/title/libinp … g_a_button

It's not clear if it works on Wayland though.

Edit:
Well, it does not work. From the wiki:

For Wayland, there is no libinput configuration file. The configurable options depend on the progress of your desktop environment's support for them; see #Graphical tools.

Last edited by Strangiato (2023-01-22 17:16:33)

Offline

Board footer

Powered by FluxBB