Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Swipe Gesture
Forum Updated to NodeBB v4.3 + New Features

Swipe Gesture

Scheduled Pinned Locked Moved General and Desktop
18 Posts 3 Posters 10.4k 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.
  • raven-worxR Offline
    raven-worxR Offline
    raven-worx
    Moderators
    wrote on last edited by
    #5

    not necessarily... some screens just provide touch point pressings and releasing. But since the other gestures are working this isn't the issue.

    Did you verify that the swipe gesture is only not recognized in a Qt application?
    Meaning does the swipe gesture work in other windows applications?

    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
    If you have a question please use the forum so others can benefit from the solution in the future

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tarantulae
      wrote on last edited by
      #6

      Yes raven, thanks for the info, in other applications the gesture is working fine (like in the metro ui for instance).

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tarantulae
        wrote on last edited by
        #7

        I looked into the source code (qstandardgestures.cpp) and it seems that swipe uses 3 touch points, while on the docs it is showing an image with only one touch point. They don't even mention the three points in the docs, what a mess.

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #8

          and now it works with 3 touch-points?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tarantulae
            wrote on last edited by
            #9

            No, I'm only receiving pan, pinch and tap events, but not the Swipe. I tried with 3 fingers, with 4 fingers, slow, fast, no way to receive the gesture.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #10

              @tarantulae

              If you look at the docs of 5.0/4.8/4.7 I put a doc note at the end a year back with the same information that you listed above.

              The same is for QPanGesture that accepts 2 touch points. For our development we are using a custom class that subclasses QGestureRecognizer and handles both swipe and pan gesture with single touch.

              Tested on Windows and works very well.

              I'll add the doc note to 5.1 as well and may be we need to address this in the mailing list .

              For reference you can "check this":http://developer.nokia.com/Community/Wiki/Custom_Swipe_Gestures_in_Qt

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tarantulae
                wrote on last edited by
                #11

                Hello Sam, thanks for the information, I was going to start to implement the recognizer by myself and the referenced code will help a lot. Thanks again !

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Sam
                  wrote on last edited by
                  #12

                  You are welcome,

                  Try and test, i'll add my implementation to the WiKi sometime later which is extended from the same reference code but implements both swipe and pan with single touch !

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tarantulae
                    wrote on last edited by
                    #13

                    I'll change the mouse events to touch points and then accept only Swipe, which is the only gesture that I'll need right now. Thanks !

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tarantulae
                      wrote on last edited by
                      #14

                      Sam, have you also faced an issue that even using grab the object doesn't receive the gesture ? I'm triggering the gesture but even after calling grabGesture() it doesn't arrive.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Sam
                        wrote on last edited by
                        #15

                        Are you using setAttribute(Qt::WA_AcceptTouchEvents); attribute for your widget anywhere ?

                        bq. Allows touch events (see QTouchEvent) to be sent to the widget. Must be set on all widgets that can handle touch events. Without this attribute set, events from a touch device will be sent as mouse events.

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tarantulae
                          wrote on last edited by
                          #16

                          Yes, I'm using the WA_AcceptTouchEvents. I'll check it.

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tarantulae
                            wrote on last edited by
                            #17

                            I'm definitively using WA_AcceptTouchEvents and also calling setAcceptTouchEvents(). The order of results being generated are: MayBeGesture, TriggerGesture and FinishGesture, but the gesture never arrive to the object. Do you know who is responsible by changing the QSwipeGesture::state() ? I'm always receiving Qt::NoGesture on the state too.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              Sam
                              wrote on last edited by
                              #18

                              Could you share you implementation? just a small test example will be sufficient .

                              Regards
                              Sam

                              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