Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to use Swipe Event in MouseArea?

    QML and Qt Quick
    2
    7
    4298
    Loading More Posts
    • 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.
    • S
      ShiKaZ last edited by

      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]

      1 Reply Last reply Reply Quote 0
      • M
        mlong last edited by

        Do you mean QSwipeGesture? Swype is a keyboard entry method.

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply Reply Quote 0
        • S
          ShiKaZ last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • M
            mlong last edited by

            I believe that you'd need a "GestureArea":http://qt-project.org/doc/qt-4.8/qml-gesturearea.html in your QML, not a MouseArea. But the two can coexist with each other. Then just handle the onSwipe: call.

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            1 Reply Last reply Reply Quote 0
            • S
              ShiKaZ last edited by

              [quote author="mlong" date="1334700658"]I believe that you'd need a "GestureArea":http://qt-project.org/doc/qt-4.8/qml-gesturearea.html in your QML, not a MouseArea. But the two can coexist with each other. Then just handle the onSwipe: call.
              [/quote]

              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?

              1 Reply Last reply Reply Quote 0
              • M
                mlong last edited by

                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.

                Software Engineer
                My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                1 Reply Last reply Reply Quote 0
                • S
                  ShiKaZ last edited by

                  [quote author="mlong" date="1334703342"]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.
                  [/quote]

                  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?

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post