How to use Swipe Event in MouseArea?
Hi! the title describ all my problem
I would like to use the Swype Event in my MouseArea…in the specific my idea consists into use the QSwypeGesture class from Qt but i don’t understand how to implement it in my QML file…
So if someone could help me…
thanks!
[Edit: Edited title; mlong]
6 replies
yes sorry for the wrong “y”
i want to you this event http://doc.qt.nokia.com/4.7-snapshot/qswipegesture.html in a MouseArea.
How can i implement this event in the QML file?
I believe that you’d need a GestureArea [qt-project.org] in your QML, not a MouseArea. But the two can coexist with each other. Then just handle the onSwipe: call.
I believe that you’d need a GestureArea [qt-project.org] in your QML, not a MouseArea. But the two can coexist with each other. Then just handle the onSwipe: call.
you are my savior!
but what if i wanted to included exactly the QSwipeGesture in the application? maybe i might create a .cpp file with a QObject that implemented a signal with the QSWipeGesture class?
I’m not sure exactly what you’re asking. You don’t need to instantiate a QSwipeGesture. The GestureArea QML component will handle that for you. Once you respond to it onSwipe, you can do anything you’d like, either in QML or C++ via the normal ways.
my question more sintetically is:
there is a way (also if i don’t need it now because of GestureArea QML) to use the classe QSwipeGesture?
You must log in to post a reply. Not a member yet? Register here!


