Details
-
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)
Description
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 } }
Attachments
Issue Links
- resulted in
-
QTBUG-106918 Ensure that QHoverEvent::scenePosition is correct
- Closed
For Gerrit Dashboard: QTBUG-100324 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
392965,2 | Don't overwrite stored eventPoint::globalPosition in QHoverEvent ctor | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
393061,6 | Add a QHoverEvent ctor taking global mouse position; deprecate the other | dev | qt/qtbase | Status: MERGED | +2 | 0 |
393062,2 | Use the new QHoverEvent ctor taking globalPos | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
393116,4 | Deprecate QContextMenuEvent and QMouseEvent ctors without globalPos | dev | qt/qtbase | Status: MERGED | +2 | 0 |
393687,2 | Add a QHoverEvent ctor taking global mouse position; deprecate the other | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
394184,2 | Use the new QHoverEvent ctor taking globalPos | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
433917,3 | Rename QHoverEvent ctor pos argument to scenePos | dev | qt/qtbase | Status: MERGED | +2 | 0 |
434728,2 | Rename QHoverEvent ctor pos argument to scenePos | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |