diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-10-08 16:34:49 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-10-08 23:20:39 +0200 |
commit | 00e8f044e1954ea47f1f0c5c5ff35fff97b732be (patch) | |
tree | 18b686e2d91bffe492c23d7187072d0c671d1f6a /src | |
parent | ee9bc61cd906505271bad887664c15b9397906ab (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 6889c2e9e5..b70a03b311 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -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 |