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.
  • T Offline
    T Offline
    tarantulae
    wrote on last edited by
    #1

    Does anyone have an minimal example of the Swipe gesture working ? The gesture isn't being recognize even on the Qt example called imagegestures. I'm using Windows 8.

    I found a bug about this too (https://bugreports.qt-project.org/browse/QTBUG-15768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel).

    Thank you !

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

      Bump. Bump.

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

        well you already provided a bug-report that it is not working. If it's a trivial problem someone probably would have fixed it already or at least closed the bug.

        Did you verify that your screen supports multi-touch points and you have installed the drivers?

        --- 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
          #4

          Yes I have support for multi-touch and the correct drivers, the other gestures are working, only Swipe isn't being recognized. But even if the screen is not multi-touch, the swipe is supposed to work because it uses only one touch, right ?

          In the bug I cited, there are only 4 votes and no answer from the development team since 2011 about it, it seems to me that the Qt testing team is doing a very poor quality work, how can a basic gesture not work on a release version of the platform ? It looks that they doesn't even tested their own example using the gesture that was supposed to work. I think that there is no way to solve this if not by re-implementing the gesture from scratch.

          1 Reply Last reply
          0
          • 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