Results 1 to 3 of 3

Thread: Swipe gesture not recognized

  1. #1
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Swipe gesture not recognized

    Hi! I'm trying to enable a swipe gesture. I created a test class like this following the documentation and the example:

    Qt Code:
    1. GestureLabel::GestureLabel(QWidget *parent) :
    2. QWidget(parent)
    3. {
    4. grabGesture(Qt::SwipeGesture);
    5. }
    6.  
    7. bool GestureLabel::event(QEvent *e)
    8. {
    9. if (e->type() == QEvent::Gesture)
    10. return gestureEvent(static_cast<QGestureEvent*>(e));
    11. return QWidget::event(e);
    12. }
    13.  
    14. bool GestureLabel::gestureEvent(QGestureEvent *event)
    15. {
    16. if (QGesture *swipe = event->gesture(Qt::SwipeGesture))
    17. swipeTriggered(static_cast<QSwipeGesture *>(swipe));
    18. return true;
    19. }
    20.  
    21. void GestureLabel::swipeTriggered(QSwipeGesture *gesture)
    22. {
    23. QMessageBox::information(this, "Gesture!", "Gesture!");
    24. }
    To copy to clipboard, switch view to plain text mode 

    Seems not to recognize swipes. I tried to put a breakpoint in line:

    Qt Code:
    1. return gestureEvent(static_cast<QGestureEvent*>(e));
    To copy to clipboard, switch view to plain text mode 

    and seems the execution doesn't stop there. Is there anything I'm doing wrong? Am I lacking anything?
    Thanks for any advice!

  2. #2
    Join Date
    May 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Swipe gesture not recognized

    sorry for bumping. I have the same problem: no swipe gesture detection at all. Tap, tapandhold, pan, pinch works ok ..

    did you find solution?

  3. #3
    Join Date
    Oct 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Swipe gesture not recognized

    hi,

    i want to make pinch gesture but i d'ont know how can i begin ? did sommeone to help me please ?

    hi,

    i want to make pinch gesture but i d'ont know how can i begin ? did sommeone to help me please ?

Similar Threads

  1. moc.exe is not recognized as an internal or external command
    By Deshi in forum Installation and Deployment
    Replies: 4
    Last Post: 23rd January 2010, 01:40
  2. Qt Pinch Gesture Support
    By Peter_APIIT in forum Qt Programming
    Replies: 1
    Last Post: 8th January 2010, 20:32
  3. mingw32-make not recognized
    By freekill in forum Installation and Deployment
    Replies: 4
    Last Post: 8th January 2010, 17:26
  4. File format not recognized -- bass.dll
    By youkai in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2009, 13:26
  5. slots and signals don't seem to be recognized
    By Jessehk in forum Qt Programming
    Replies: 2
    Last Post: 31st July 2007, 20:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.