-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2, 6.9.1
-
None
-
Windows 11
C++ 17
Tablet: GAOMON M6
I first reported the issue on the forum, but received no response, so I file it as a bug.
Description
Working using Qt with a tablet with the stylus button simulating a mouse right button.
There are two problems happening when the stylus is on the tablet:
- When pressing down the stylus button: some tablet/mouse press events have QEvent::button() with Qt::LeftButton and QEvent::buttons() with Qt::RightButton
- After pressing down the stylus button and lifting the stylus: no TabletRelease/MouseButtonRelease is sent
Reproduce the problem
- Place the stylus on the tablet
- Press the stylus button (simulating a mouse right click button) (the press event with wrong button/buttons is sent)
- Lift the stylus from the tablet (no MouseButtonRelease/TabletRelease event sent here)
- Release the stylus button
Sample code
See the attached .zip file for a minimal application.
The application has:
- An area to test the tablet/mouse inputs
- A label widget to track the input events
The application also comes with a fix.
Notes
- I tried to toggle the attribute Qt::AA_SynthesizeMouseForUnhandledTabletEvents but it does not change anything