Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to use Swipe Event in MouseArea?
Forum Updated to NodeBB v4.3 + New Features

How to use Swipe Event in MouseArea?

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 2 Posters 4.9k 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.
  • S Offline
    S Offline
    ShiKaZ
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        ShiKaZ
        wrote on last edited by
        #3

        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
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          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
          0
          • S Offline
            S Offline
            ShiKaZ
            wrote on last edited by
            #5

            [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
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              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
              0
              • S Offline
                S Offline
                ShiKaZ
                wrote on last edited by
                #7

                [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
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved