Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML gestures on N900 / Maemo
Forum Updated to NodeBB v4.3 + New Features

QML gestures on N900 / Maemo

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 2.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.
  • B Offline
    B Offline
    bartleby
    wrote on last edited by
    #1

    I'm trying out the (experimental) QML GestureArea on an N900 (Qt 4.7).

    E.g.,

    @GestureArea {
    anchors.fill: parent
    onPan: console.log('pan')
    onPinch: console.log('pinch')
    onSwipe: console.log('swipe')
    onTapAndHold: console.log('tapAndHold')
    onTap: console.log('tap')
    onGesture: console.log('gesture')
    }@

    I'm able to generate tap and tapandhold events, but nothing else.
    With the N900 being resistive, I wouldn't expect pinch to work, but I'm surprised that I can't swipe or pan.
    Am I missing something, or does this feature just not work yet?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      athamala
      wrote on last edited by
      #2

      All those other gestures require more than one touch point, so they are not available on N900. See related QT bug report.

      http://bugreports.qt.nokia.com/browse/QTBUG-15996

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bartleby
        wrote on last edited by
        #3

        Thanks for the bug report link.

        In the case of swipe, I was misled by this:

        http://doc.qt.nokia.com/4.6/qswipegesture.html#details

        which is apparently just wrong, and by the fact that my N900 says "Swipe to unlock".

        1 Reply Last reply
        0
        • A Offline
          A Offline
          athamala
          wrote on last edited by
          #4

          You might want to make it a Mousearea and check for its signal handlers like onPressed, onPositionChanged and onReleased and get position information from MouseEvent parameters in those handlers. I think that swipe to unlock is made similarly by monitoring mouse events.

          http://doc.qt.nokia.com/4.7-snapshot/qml-mousearea.html
          http://doc.qt.nokia.com/4.7-snapshot/qml-mouseevent.html

          To see mouseevents and dragging in mousearea in use take a look at Mousearea example, that has clickable and draggable boxes.

          http://doc.qt.nokia.com/4.7-snapshot/declarative-touchinteraction-mousearea-mousearea-example-qml.html

          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