QWidget: document that a widget might only get a mouseDoubleClickEvent

If two widgets are on top of each other, and the top widget disappears
in response to a press or release that is followed by a double click,
then the widget at the bottom only receives the double click event.

This is a sequence of events that the application developer that choses
to build such a UI has to take care of.

Change-Id: I440efd2cac01631de8995abf9a9fb76815de8f9a
Fixes: QTBUG-61173
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Volker Hilsheimer 2019-10-08 16:34:49 +02:00
parent ee9bc61cd9
commit 00e8f044e1

View File

@ -9218,9 +9218,11 @@ void QWidget::mouseReleaseEvent(QMouseEvent *event)
The default implementation calls mousePressEvent().
\note The widget will also receive mouse press and mouse release
events in addition to the double click event. It is up to the
developer to ensure that the application interprets these events
correctly.
events in addition to the double click event. And if another widget
that overlaps this widget disappears in response to press or
release events, then this widget will only receive the double click
event. It is up to the developer to ensure that the application
interprets these events correctly.
\sa mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent(),
event(), QMouseEvent