aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-07-04 15:14:23 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-07-04 18:05:34 +0000
commitcce7cae5e464a34ecbacfa90f601a9b1dad712c3 (patch)
tree286826c7d8252ac0092cc082026e59872b919edd /src
parentaf74ca8e0ccf0fc59d6e918c679fcc5139aab59d (diff)
BusyIndicator: don't block touch
Unlike with mouse events there's setAcceptedMouseButtons(), currently there's no way to control whether a control receives touch events or not. As a temporary workaround until QQuickItem::setAcceptTouchEvents() has been added, we'll have to ignore touch events by hand. Task-number: QTBUG-61785 Change-Id: I195d5ec3122ca0c7f2fade700b5b0c221472a243 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickbusyindicator.cpp7
-rw-r--r--src/quicktemplates2/qquickbusyindicator_p.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickbusyindicator.cpp b/src/quicktemplates2/qquickbusyindicator.cpp
index 883066d7..e4f20d83 100644
--- a/src/quicktemplates2/qquickbusyindicator.cpp
+++ b/src/quicktemplates2/qquickbusyindicator.cpp
@@ -115,6 +115,13 @@ void QQuickBusyIndicator::setRunning(bool running)
emit runningChanged();
}
+#if QT_CONFIG(quicktemplates2_multitouch)
+void QQuickBusyIndicator::touchEvent(QTouchEvent *event)
+{
+ event->ignore(); // QTBUG-61785
+}
+#endif
+
#if QT_CONFIG(accessibility)
QAccessible::Role QQuickBusyIndicator::accessibleRole() const
{
diff --git a/src/quicktemplates2/qquickbusyindicator_p.h b/src/quicktemplates2/qquickbusyindicator_p.h
index 3607cc1f..f140764b 100644
--- a/src/quicktemplates2/qquickbusyindicator_p.h
+++ b/src/quicktemplates2/qquickbusyindicator_p.h
@@ -69,6 +69,10 @@ Q_SIGNALS:
void runningChanged();
protected:
+#if QT_CONFIG(quicktemplates2_multitouch)
+ void touchEvent(QTouchEvent *event) override;
+#endif
+
#if QT_CONFIG(accessibility)
QAccessible::Role accessibleRole() const override;
#endif