Qt Declarative (Quick 2)
Go to file
Volker Hilsheimer dc8f44b145 QQuickWidget: always accept touch events and grabbed event points
A QQuickWidget contains a Quick UI, which can be expected to handle
touch events, and it handles touch events by forwarding them to the
QQuickWindow. So set the AcceptTouchEvents attribute and let the
Qt Quick delivery machinery deal with the touch-mouse synthesis
within the scene.

Also, Qt Quick's event delivery might return event points as ignored
after setting the exclusive grabber. Qt Widgets touch event delivery
logic doesn't care about exclusive grabbers, and relies on the event
points being accepted to make the widget that received the TouchBegin
an implicit grabber. QQuickWidget needs to translate those states back,
so accept all points that come back with a grabber.

Add a test that verifies that a button in a popup gets all events,
and that those events are translated correctly - without the fix,
the "clicked" test fails, as the release is delivered, but with
coordinates outside of the button.

Also test that we can have two QQuickWidgets where each gets one
touch point.

Fixes: QTBUG-101736
Pick-to: 6.5 6.4 6.2
Change-Id: I3a2bf05fd297ae4d72b6e236ecd8e5ddac37ce06
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-22 09:40:41 +01:00
LICENSES Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
cmake Make Sure that `qml_compile_hash_p.h` Isn't Missing 2022-10-26 14:02:58 +02:00
coin qmldom: use a released Qt 6.3 2022-10-06 11:41:18 +00:00
dist Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
examples Improve blur items sizing 2022-12-20 12:09:59 +02:00
features Add the skeleton for a D3D12 backend 2016-02-19 14:51:37 +00:00
src QQuickWidget: always accept touch events and grabbed event points 2022-12-22 09:40:41 +01:00
tests QQuickWidget: always accept touch events and grabbed event points 2022-12-22 09:40:41 +01:00
tools qmake: Fix generated *_qmlcache.cpp file paths 2022-12-14 17:39:55 +01:00
.cmake.conf Bump version to 6.6.0 2022-12-15 22:14:26 +02:00
.gitattributes qmlformat: improve testing of file based options 2021-11-04 13:35:48 +01:00
.gitignore Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
.gitmodules Update to the latest version of the ecmascript test suite 2018-04-26 20:26:36 +00:00
.tag Use tree hash rather than commit hash in .tag file 2022-01-25 23:55:27 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
README.md Rewrite README.md 2021-08-12 13:15:17 +00:00
conanfile.py Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
configure.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2022-12-21 05:16:55 +00:00
qt_cmdline.cmake Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
qtdeclarative.doxy Add doxyfile for building doxygen documentation 2018-08-16 15:54:40 +00:00
sync.profile Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00