Skip to content

Add Qt Quick double-click gestures to the C++ API - #153

Open
mertalp-ulus wants to merge 5 commits into
faaxm:masterfrom
mertalp-ulus:feature/qtquick-double-click-upstream
Open

mertalp-ulus wants to merge 5 commits into
faaxm:masterfrom
mertalp-ulus:feature/qtquick-double-click-upstream

Conversation

@mertalp-ulus

@mertalp-ulus mertalp-ulus commented Oct 18, 2026 •

Copy link
Copy Markdown

References #116.

Adds four C++ TestServer::mouseDoubleClick overloads matching the existing click API: item center, relative position, relative position plus pixel offset, and button/modifiers.

Qt Quick receives a complete press → release → press → double-click → release gesture. The first release can update selection before confirmation. Events use the target's window and global coordinates, correct released-button masks, and increasing timestamps that separate explicit gestures without sleeps or event-loop pumping in the backend.

Missing targets, invalid button/modifier masks, an already-held button, and unsupported backends report executor errors without starting a partial double-click. Calls enqueue work; callers must wait for an observable application result.

Scope and compatibility

  • Implemented for the C++ API with Qt Quick.
  • Qt Widgets inherits the default unsupported Events::mouseDoubleClick implementation.
  • RPC double-click methods are not registered; RPC and Widgets gestures remain follow-ups.
  • The optional virtual method preserves source compatibility for existing backends. Binary consumers and backends must be rebuilt.

Validation

Tested source: 173dc4c38873fbc9f952e1ab697ba1927b05cc15.

  • Windows/MSVC 14.50, static builds: all four CTest suites pass on Qt 6.11.0 and 6.11.1.
  • Qt 6.11.0: the ten-case GUI gesture suite passes 100 consecutive repetitions.
  • Command/GUI coverage includes argument forwarding and rejection, ordinary-click negative control, native Qt positive control, repeated TapHandler gestures, later drag/key input, transformed coordinates, and target destruction.
  • New global-coordinate regression covers moved windows and fractional transformed positions. It failed with the previous cursor-derived coordinates and passes with explicit target coordinates.
  • Windows/Qt 6.11.0 shared build: Core, QtQuick, QtWidgets, and enabled examples build; installation and the installed BasicStandalone example build pass.
  • A consumer linked to the installed Core DLL successfully invokes all four overloads. Shared tests are disabled, matching the upstream shared-build configuration; GUI behavior is covered by the static test builds.
  • clang-format 11.1.0 passes on all changed C++ files.

Upstream Qt 5.15.2, Qt 6.9.2/6.10.3, Linux/macOS, and their shared/install configurations remain unverified pending upstream CI.

@mertalp-ulus
mertalp-ulus marked this pull request as ready for review October 19, 2026 09:27
@mertalp-ulus

Copy link
Copy Markdown
Author

Hi @faaxm ,

This PR is ready for review and adds four C++ double-click overloads for Qt Quick. Local Windows tests passed on Qt 6.11.0 and 6.11.1; Qt 6.11.0 also passed 100 gesture-suite repetitions and shared-build, installation, and consumer checks. RPC and Widgets support remain follow-up work.

Could you please approve the pending workflows so the broader Qt/platform matrix can run?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant