Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Shawn Rutledge 646cef5a86 ImageGestures example: decide direction based on swipeAngle
swipeTriggered() often chose the wrong direction, because the logic
was allowing either vertical or horizontal decisions to override each
other: if you swipe to the right, but also a little upwards for example,
"up" overrode "right" and you would go back instead of forward.
It worked only if you made an effort to swipe both down and right to
go forwards, and both up and left to go back.

The docs are not wrong at least: horizontalDirection or
verticalDirection is set to NoDirection only in the case that the angle
doesn't have "a horizontal component" or "a vertical component",
respectively (assuming that's even possible). So those enum properties
are only useful if you want to detect swiping on only one axis.

Instead, we now check which side of a 45 degree line the angle is on.

Pick-to: 6.10 6.9 6.8 6.5
Task-number: QTBUG-37759
Task-number: QTBUG-46195
Change-Id: Ibd78071dc78ccaa13d63200e26a614b7017a9b1b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-08-01 01:14:13 +02:00
.github/workflows
LICENSES
bin
cmake cmake: Persist macOS SDK name, to work around CMake 4.x 2025-07-31 20:25:59 +00:00
coin Enable vcpkg usage for crosscompiled tests 2025-07-16 15:54:22 +02:00
config.tests
dist Remove year from Qt Copyright in REUSE.toml 2025-07-09 15:16:21 +02:00
doc Doc: Update link from VxWorks to Qt Creator documentation when QC 17.0 is released 2025-07-31 12:35:04 +00:00
examples ImageGestures example: decide direction based on swipeAngle 2025-08-01 01:14:13 +02:00
lib
libexec Android: account for namespace = androidPackageName in runner script 2025-07-26 04:38:56 +03:00
mkspecs Remove relics of objc_namespace script 2025-07-31 20:35:05 +08:00
qmake Fail builds on Apple platforms with invalid Info.plist 2025-07-04 15:02:22 +02:00
src QLocale/Unix: fix Coverity complaint re: "logically dead code" 2025-07-31 23:06:00 +02:00
tests QWidgetBaselineTest: Wait for window expose after show 2025-07-31 20:48:23 +02:00
util wasm: Properly separate lines in test output 2025-07-17 17:05:21 +02:00
.cmake.conf Bump minimum requirement for visionOS to version 2 2025-06-20 15:25:11 +02:00
.gitattributes
.gitignore Fix .gitignore to ignore any build dir under the repo or its subdirs 2025-07-22 19:12:39 +00:00
.gitreview
.tag
CMakeLists.txt
REUSE.toml Add android tempaltes to the REUSE.toml 2025-07-10 16:13:27 +02:00
config_help.txt Make doc-snippets a "build part", ie -nomake/make doc-snippets 2025-07-30 16:01:51 +02:00
configure
configure.bat
configure.cmake wasm: require wasm-exceptions for jspi 2025-07-17 13:57:57 +02:00
dependencies.yaml
licenseRule.json Fix typo in licenseRule.json 2025-07-04 16:43:53 +02:00
qt_cmdline.cmake Make doc-snippets a "build part", ie -nomake/make doc-snippets 2025-07-30 16:01:51 +02:00