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/qquickscrollbar.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/qquickscrollbar.cpp')
-rw-r--r-- | src/controls/qquickscrollbar.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/controls/qquickscrollbar.cpp b/src/controls/qquickscrollbar.cpp index 48f85a84..aaa0e007 100644 --- a/src/controls/qquickscrollbar.cpp +++ b/src/controls/qquickscrollbar.cpp @@ -262,7 +262,6 @@ void QQuickScrollBar::mousePressEvent(QMouseEvent *event) if (d->offset < 0 || d->offset > d->size) d->offset = d->size / 2; setPressed(true); - event->accept(); } void QQuickScrollBar::mouseMoveEvent(QMouseEvent *event) @@ -270,7 +269,6 @@ void QQuickScrollBar::mouseMoveEvent(QMouseEvent *event) Q_D(QQuickScrollBar); QQuickControl::mouseMoveEvent(event); setPosition(qBound(0.0, positionAt(event->pos()) - d->offset, 1.0 - d->size)); - event->accept(); } void QQuickScrollBar::mouseReleaseEvent(QMouseEvent *event) @@ -280,7 +278,6 @@ void QQuickScrollBar::mouseReleaseEvent(QMouseEvent *event) setPosition(qBound(0.0, positionAt(event->pos()) - d->offset, 1.0 - d->size)); d->offset = 0.0; setPressed(false); - event->accept(); } qreal QQuickScrollBar::positionAt(const QPoint &point) const |