diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-30 10:42:48 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-02 10:42:46 +0200 |
commit | b6280dd207746f32092f5cb2b55b8c5f8ffa44b9 (patch) | |
tree | 4d094f6d6b76186f75259bf7d80d5679ca33029b /src/quicktemplates2/qquickoverlay.cpp | |
parent | 43c9cc30a26f7fb482248115eec418128a1add0f (diff) |
Add setAcceptTouchEvents() in controls that handle touch events
This could have been done since Qt 5.10. In Qt 6 it becomes mandatory;
so perhaps we will add a qWarning in case an Item handles touch events
without declaring that it wants to handle them, to encourage users
to do that. This patch will then prevent that warning when using Controls.
See qtdeclarative/1457df74f4c1d770e1e820de8cd082be1bd2489e and then
qtdeclarative/ab91e7fa02a562d80fd0747f28a60e00c3b45a01
Cherry-picked from dev branch 0ef66bfa 811c6193 and 3c2eab82.
Change-Id: I5f9318bd1cad0f760caf02b9066e729af3601098
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickoverlay.cpp')
-rw-r--r-- | src/quicktemplates2/qquickoverlay.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp index e9f8801d..b8d417f2 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -311,6 +311,9 @@ QQuickOverlay::QQuickOverlay(QQuickItem *parent) Q_D(QQuickOverlay); setZ(1000001); // DefaultWindowDecoration+1 setAcceptedMouseButtons(Qt::AllButtons); +#if QT_CONFIG(quicktemplates2_multitouch) + setAcceptTouchEvents(true); +#endif setFiltersChildMouseEvents(true); setVisible(false); |