Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.4.2, 5.5.0
-
None
-
I have tested this on Mac OS 10.10.3 and Windows 7 with the same result.
-
others for 5.7; 5.12 on Windows: 8ada0633cd58e0608df2e16880f1293286025504; b4b706d454b785aecbec5cefe46e2a6d7572edbf
Description
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.
Attachments
Issue Links
- relates to
-
QTBUG-26116 Support proximity motion
- Closed
-
QTBUG-100788 TapHandler tapped signal is emitted twice when using a stylus
- Closed
-
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
-
QTBUG-93486 Clean up delivery logic of QContextMenuEvent
- Reported
- resulted in
-
QTBUG-129998 synthesis of mouse events after unaccepted QTabletEvents doesn't work on some platforms
- Reported
-
QTBUG-51617 QMouseEvent::source() reports MouseEventNotSynthesized when it comes from a Wacom tablet
- Closed