-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.3
-
None
-
OpenSUSE Leap 15.3, GCC 10.3.0
-
-
0a64a044b6 (qt/qtbase/dev) 0a64a044b6 (qt/tqtc-qtbase/dev) a28fd4e54d (qt/qtbase/6.3) a28fd4e54d (qt/tqtc-qtbase/6.3)
QHelpEvent::globalPos() returns frequently the wrong value QPointF(-1,-1). This causes tooltips to appear near the top/left edge of the screen.
The reason is the call of 'dispatchEnterLeave' in QApplicationPrivate::sendMouseEvent. Before the call, the result of 'event->globalPosition()' is correct. After the call QPointF(-1,-1) is returned.
To reproduce the bug, add the lines marked with '#if 1' to 'sendMouseEvent' and move the mouse e.g. over the toolbar of Qt Designer.
} else if (lastMouseReceiver && widgetUnderMouse) {
#if 1
auto savedPosition = event->globalPosition();
#endif
// Dispatch enter/leave if we move:
// 1) from an alien widget to another alien widget or
// from a native widget to an alien widget (first OR case)
// 2) from an alien widget to a native widget (second OR case)
if ((alienWidget && alienWidget != lastMouseReceiver)
|| (isAlien(lastMouseReceiver) && !alienWidget)) {
if (activePopupWidget) {
if (!QWidget::mouseGrabber())
dispatchEnterLeave(alienWidget ? alienWidget : nativeWidget, lastMouseReceiver, event->globalPosition());
} else {
dispatchEnterLeave(receiver, lastMouseReceiver, event->globalPosition());
}
#if 1
if (event->globalPosition() != savedPosition)
qDebug() << event->globalPosition() << savedPosition;
#endif
}
}
- resulted in
-
QTBUG-106918 Ensure that QHoverEvent::scenePosition is correct
-
- Closed
-
| For Gerrit Dashboard: QTBUG-100324 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 684979,1 | doc: Clarify QHoverEvent constructor arguments | dev | qt/qtbase | Status: NEW | +1 | 0 |