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. QGesture and QDeclarativeItem

QGesture and QDeclarativeItem

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 4 Posters 2.7k 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.
  • P Offline
    P Offline
    pdrummond
    wrote on last edited by
    #1

    Can anyone tell me if I need to do anything extra/undocumented to get a QDeclarativeItem to grab gesture events?

    I am using the code described in the documentation (http://goo.gl/4Ym1R) but I just can't get any gesture events to come into the event() function.

    When I ask Google for help I just get examples of people trying to do this outside QML with a standard C++ QGraphicView based app.

    I wonder if QML is somehow blocking gestures?

    Thanks,
    Paul Drummond

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deimos
      wrote on last edited by
      #2

      Hi,
      I am in the same situation. With simulator gestures are recongnized, but on the device (Nokia C7) aren't.
      Have you managed this ?

      thanks

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fcrochik
        wrote on last edited by
        #3

        I have it working on my application (works on Symbian and Harmattan):

        I am not sure if I tried grabGesture on the QDeclarativeItem. That is how I have it working:

        My QDeclarativeItem has a QGraphicsWidget child with:

        @
        setAttribute(Qt::WA_AcceptTouchEvents);
        grabGesture(Qt::PinchGesture);
        @

        and I installed an event filter on it so could process the events on my declarative item.

        Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mardy
          wrote on last edited by
          #4

          Hi, I have exactly the same problem: my QDeclarativeItem subclass doesn't receive any QGesture events.
          Did you manage to solve your issue?

          @fcrochik: a QDeclarativeItem is a QGraphicsObject subclass, so in theory grabGesture() should work there as well. Why exacly did you call those methods from the child widget and not from the QDeclarativeItem itself?

          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