Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.11, 6.4.1
-
8fcc92e38 (6.4), 7956d9e06 (dev)
Description
For a top level widget without any child widgets, the TabletMove event is not sent. Other events such as TabletPress / TabletRelease are correctly observed. Even if setAttribute(Qt::WA_TabletTracking) is called, it still doesn't work.
In qwidgetwindow.cpp, QWidgetWindow::handleTabletEvent().
void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
{
static QPointer<QWidget> qt_tablet_target = nullptr;QWidget *widget = qt_tablet_target;
if (!widget) {
widget = m_widget->childAt(event->pos());
if (event->type() == QEvent::TabletPress )Unknown macro: { if (!widget) widget = m_widget; qt_tablet_target = widget; }}
Given this code, there's a check to see if widget is null, and if so, it checks to see if there's a widget child at the cursor position. In our case, this is no, since there are no child widgets. The next check is to see then if the event type is a TabletPress, which it is not for a TabletMove. Thus for any hovering events in this widget, they are ignored.
To reproduce the issue, please run the attached example project using a tablet input device.
Attachments
Issue Links
- relates to
-
QTBUG-56263 QTabletEvent of type QEvent::TabletMove not send while the stylus hovers over the tablet
- Closed
- resulted from
-
QTBUG-26116 Support proximity motion
- Closed