Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
None
-
Windows 7
Description
QQuickWidget creates mapped events to send to the d->offscreenWindow()
If the user ignores the mouseEvent in a MouseArea underneath, they can set accepted == false. If the mapped event returns with an ignored state, it should tell the unmapped event that it's state is also ignored?
I.e.
Currently:
void QQuickWidget::mousePressEvent(QMouseEvent *e) { Q_D(QQuickWidget); Q_QUICK_PROFILE(addEvent<QQuickProfiler::Mouse>()); QMouseEvent mappedEvent(e->type(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); }
Possible solution?:
void QQuickWidget::mousePressEvent(QMouseEvent *e) { Q_D(QQuickWidget); Q_QUICK_PROFILE(addEvent<QQuickProfiler::Mouse>()); QMouseEvent mappedEvent(e->type(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); e->setAccepted(mappedEvent->isAccepted()); }
Attachments
For Gerrit Dashboard: QTBUG-40784 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
92245,2 | Propagate the accepted flag back in QQuickWidget mouse handlers | 5.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |