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. MouseArea & Multitouch

MouseArea & Multitouch

Scheduled Pinned Locked Moved QML and Qt Quick
15 Posts 5 Posters 15.0k Views
  • 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.
  • A Offline
    A Offline
    aabc
    wrote on last edited by
    #6

    Isn't MouseArea designed for Mouse and not for Touch ?
    When you say "preferred solution" you mean performance or programming ?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexleutgoeb
      wrote on last edited by
      #7

      MouseArea only listens for MouseEvents and therefore is designed for mouse related input methods, that's right.

      Symbian for example however sends for each first touch (primary touch) a related mouse event, and touch events received from a qwidget get converted to mouse events too (if the touches are not primary).

      So if you're only interested in single touch events the MouseArea is the easiest way to go (and therefore the "preferred solution"?), if you require advanced multitouch recognition you've to look at PinchArea, TouchArea or your own custom implementation, as Christian probably does for now.

      Alex

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aabc
        wrote on last edited by
        #8

        My problem is that The MouseArea works fine with stylus but poor with fingrer touch.
        Did you encounter that problem ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alexleutgoeb
          wrote on last edited by
          #9

          Didn't have any problems so far in general. Which platform are you testing on? And what's your definition of "poor"? ;) Are the events in-accurate? Are you losing your drag events?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aabc
            wrote on last edited by
            #10

            My target is Embedded Linux over Freescale IMX53.
            In poor I mean that QML elements like flickable and lists are dragged in a very bad way when I use finger comparing to stylus (very unaccurate and hard to drag)

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alexleutgoeb
              wrote on last edited by
              #11

              I've no experience with that but I'm pretty sure your problem isn't related to the Qt Quick MouseArea implementation. (I would guess the hardware drivers or probably the hardware itself is rather inaccurate with handling touch events?)

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aabc
                wrote on last edited by
                #12

                Did you use Qt Quick over touch devices ?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  alexleutgoeb
                  wrote on last edited by
                  #13

                  Only on Symbian/Meego ones, there it is working like intended...

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    agocs
                    wrote on last edited by
                    #14

                    [quote author="alexleutgoeb" date="1337769088"]MouseArea only listens for MouseEvents and therefore is designed for mouse related input methods, that's right.

                    So if you're only interested in single touch events the MouseArea is the easiest way to go (and therefore the "preferred solution"?), if you require advanced multitouch recognition you've to look at PinchArea, TouchArea or your own custom implementation, as Christian probably does for now.

                    [/quote]

                    Exactly. With MultiPointTouchArea many traditional mouse/single-touch tasks like click or double click detection, simple dragging support, etc. will become more complicated while with MouseArea these are available out of the box. MultiPointTouchArea is not meant to replace MouseArea, it rather complements it.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sibislaw2
                      wrote on last edited by
                      #15

                      [quote author="feldifux" date="1337275306"]Thanks!
                      So I'll implement my own item in C++ handling touch events, which has the same API as MouseArea so it is easy to use existing code with it. Because from a QML-user perspective, I would like to have an item where I dont have to care how many touchpoints there are, but only if there was a touch in the area I defined. So like a MultiPointTouchArea with a single touchPoint.[/quote]

                      Could you share code with us or at least tell how to do this ?

                      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