Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about use qt's built-in QGesture? #1654

Open
xiaoyifang opened this issue Jul 8, 2024 · 1 comment
Open

What about use qt's built-in QGesture? #1654

xiaoyifang opened this issue Jul 8, 2024 · 1 comment

Comments

@xiaoyifang
Copy link
Owner

#ifndef Q_OS_MACOS
ui.centralWidget->grabGesture( Gestures::GDPinchGestureType );
ui.centralWidget->grabGesture( Gestures::GDSwipeGestureType );
#endif

@shenlebantongying
Copy link
Collaborator

shenlebantongying commented Jul 8, 2024

Current reality:

  • Yes, Qt now has better built-in gestures, and it is not hard to do clean: replace gestures.cc with Qt's built-ins #1407. However, real hardware is needed to test and connect gestures to actions.
  • The webengine widget on macOS has rich gestures built-in. Just don't add/touch/modify them.

For GD's in-house implementation, there are maybe some bugs if user has unusual setups (unusual to 10 years ago), such as:

  • Wayland -> GD's implementation simply doesn't work because the screen coordinate cannot be obtained, and the relevant methods are deprecated.
    • Wayland appears to implement gesture recognition on the system's side (via libinput?) simliar to macOS instead of letting apps do it on their own.
  • Hi-Dpi or large screen -> GD's implementation only needs very small movement to trigger the gestures. Again, deprecated methods are used.
  • The webengine widget appears to have some built-in gestures for Linux/Windows like on macOS too. Conflict?

(BTW, I welcome sponsorship to buy me a high-precision trackpad/touchscreen that supports 3-figures to improve gesture support 😅)

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

No branches or pull requests

2 participants