Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android gestures
Qt 6.11 is out! See what's new in the release blog

Android gestures

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 581 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by MartinD
    #1

    I have a Qt 5.11.2 app running on Lenovo Tab E10 tablet. In a custom widget, I would like to receive gestures.

    I called this in constructor of the widget:

    setAttribute( Qt::WA_AcceptTouchEvents );
    grabGesture( Qt::PinchGesture );
    

    I then implemented method in my widget:

    bool QCustomPlot::event( QEvent *event ){
        qDebug() << "QCustomPlot::event" << event->type();
    >
    

    However, for two fingers pinch gesture I only receive QEvent::Type(MouseButtonPress), multiple QEvent::Type(MouseMove) and QEvent::Type(MouseButtonRelease) events.

    I would be able to build pinch gesture from mouse events but I never receive any event for second finger touching the screen.

    So, how to enable pinch gesture on my tablet? If it is not possible, how can I build pinch gesture from mouse events?

    M 1 Reply Last reply
    0
    • M MartinD

      I have a Qt 5.11.2 app running on Lenovo Tab E10 tablet. In a custom widget, I would like to receive gestures.

      I called this in constructor of the widget:

      setAttribute( Qt::WA_AcceptTouchEvents );
      grabGesture( Qt::PinchGesture );
      

      I then implemented method in my widget:

      bool QCustomPlot::event( QEvent *event ){
          qDebug() << "QCustomPlot::event" << event->type();
      >
      

      However, for two fingers pinch gesture I only receive QEvent::Type(MouseButtonPress), multiple QEvent::Type(MouseMove) and QEvent::Type(MouseButtonRelease) events.

      I would be able to build pinch gesture from mouse events but I never receive any event for second finger touching the screen.

      So, how to enable pinch gesture on my tablet? If it is not possible, how can I build pinch gesture from mouse events?

      M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      I've never read anyone succeed in this and if you don't get events for the other finger, it might be impossible.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Amandaa
        Banned
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved