-
Type:
Bug
-
Status: Closed
-
Priority:
P1: Critical
-
Resolution: Done
-
Affects Version/s: 5.4.2, 5.5.0
-
Fix Version/s: 5.7, 5.12.0 Alpha
-
Component/s: GUI: Basic Input System (keyboard, mouse, touch)
-
Labels:None
-
Environment:I have tested this on Mac OS 10.10.3 and Windows 7 with the same result.
-
Commits:others for 5.7; 5.12 on Windows: 8ada0633cd58e0608df2e16880f1293286025504; b4b706d454b785aecbec5cefe46e2a6d7572edbf
In a QWidget derived class object with implemented tabletEvent(QTabletEvent *event) and mousePressEvent(QMouseEvent *event), the mousePressEvent gets called every time tabletEvent gets called with type QTabletEvent::TabletPress. According to the Qt documentation, this should not happen:
"The event handler QWidget::tabletEvent() receives TabletPress, TabletRelease and TabletMove events. Qt will first send a tablet event, then if it is not accepted by any widget, it will send a mouse event."
Here are the mousePressEvent() and tabletEvent() functions of the attached example project:
void TabletWidget::tabletEvent(QTabletEvent *event)
{ event->accept(); qDebug() << "tabletEvent: " << event->type(); }void TabletWidget::mousePressEvent(QMouseEvent *event)
{ qDebug() << "mousePressEvent"; }The output generated if I press any button of the Wacom Intuos CTH-680S-DEIT is:
tabletEvent: 92
mousePressEvent
tabletEvent: 87
tabletEvent: 87
tabletEvent: 87
tabletEvent: 87
tabletEvent: 93
So first the tabletEvent gets called, and even though I accept the event, mousePressEvent gets called anyway. Every following tabletEvent is of type QTabletEvent::TabletMove and the last one is QTabletEvent::TabletRelease. From the Qt documentation:
QEvent::TabletMove 87
QEvent::TabletPress 92
QEvent::TabletRelease 93
I have tested this on Mac OS 10.10.3 and Windows 7 with the same result.
- is related to
-
QTBUG-26116 Support proximity motion
-
- Closed
-
- relates to
-
QTBUG-38681 WinRT: Pen input should be synthesized to mouse input
-
- Closed
-
-
QTBUG-59214 Wacom: it seems tabletEvent() by deault accepting it.
-
- Closed
-
-
QTBUG-67032 Mouse Wheel event gets propagated even when event filter should stop it
-
- Closed
-
- resulted in
-
QTBUG-51617 QMouseEvent::source() reports MouseEventNotSynthesized when it comes from a Wacom tablet
-
- Closed
-