diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-06-24 18:26:42 +0200 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-06-26 08:35:54 +0000 |
commit | d88d9d63422c086417e8cc1935f8d3376043f845 (patch) | |
tree | 4d3c24e4daeb25eba3aa692062f165d33017093f /src/controls/qquickbutton.cpp | |
parent | 8c5100ca39776c7a1b307a74961ee696f1163bcc (diff) |
QQuickControl: Accept all the mouse events by default
Controls are mouse-opaque items in the sense that, if
the control doesn't do anything with the mouse (or touch)
event, there's no need to propagate it further. This avoids
issues with controls like ToolBar, where clicking on its
background may send the mouse event to an item below it.
Change-Id: Ib3c95a55db2abfd6a13333f4b0187852a656ec03
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/qquickbutton.cpp')
-rw-r--r-- | src/controls/qquickbutton.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/controls/qquickbutton.cpp b/src/controls/qquickbutton.cpp index e8967a13..ffdd00bd 100644 --- a/src/controls/qquickbutton.cpp +++ b/src/controls/qquickbutton.cpp @@ -229,14 +229,12 @@ void QQuickButton::mousePressEvent(QMouseEvent *event) QQuickControl::mousePressEvent(event); setPressed(true); emit pressed(); - event->accept(); } void QQuickButton::mouseMoveEvent(QMouseEvent *event) { QQuickControl::mouseMoveEvent(event); setPressed(contains(event->pos())); - event->accept(); } void QQuickButton::mouseReleaseEvent(QMouseEvent *event) @@ -251,7 +249,6 @@ void QQuickButton::mouseReleaseEvent(QMouseEvent *event) } else { emit canceled(); } - event->accept(); } void QQuickButton::mouseUngrabEvent() |