aboutsummaryrefslogtreecommitdiffstats
path: root/src/controls/qquickcontrol.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-06-24 18:26:42 +0200
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-06-26 08:35:54 +0000
commitd88d9d63422c086417e8cc1935f8d3376043f845 (patch)
tree4d3c24e4daeb25eba3aa692062f165d33017093f /src/controls/qquickcontrol.cpp
parent8c5100ca39776c7a1b307a74961ee696f1163bcc (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/qquickcontrol.cpp')
-rw-r--r--src/controls/qquickcontrol.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/controls/qquickcontrol.cpp b/src/controls/qquickcontrol.cpp
index e2efbf02..5415ff8e 100644
--- a/src/controls/qquickcontrol.cpp
+++ b/src/controls/qquickcontrol.cpp
@@ -454,6 +454,21 @@ void QQuickControl::setContentItem(QQuickItem *item)
}
}
+void QQuickControl::mousePressEvent(QMouseEvent *event)
+{
+ event->accept();
+}
+
+void QQuickControl::mouseMoveEvent(QMouseEvent *event)
+{
+ event->accept();
+}
+
+void QQuickControl::mouseReleaseEvent(QMouseEvent *event)
+{
+ event->accept();
+}
+
void QQuickControl::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
Q_D(QQuickControl);