Results 1 to 8 of 8

Thread: Touch events not recognized for trackpad

  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Touch events not recognized for trackpad

    Hello. I would like to implement pinch zooming feature for my application. I started from checking Qt samples (pinchzoom and gestures) and noticed those samples do not work for my trackpad From the other side, touch screen events seem to be recognized fine. I am not sure, were those apps intended for some certain devices or device types only? Is there something that needs to be changed in the code in order to get it working on the trackpad or is that a bug?

    I have no problems when using the trackpad to zoom or scroll in my web browser, for example, so the device must be ok.

    I tried Qt 4.8.6 and Qt 5.4 - none of them work. My platform is DELL XPS 15 9530 + Windows 8.1 x64.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Touch events not recognized for trackpad

    If the driver for your trackpad doesn't support gestures (ie. it is implemented as a mouse only), then you won't see those events. Check the driver for your Dell in Control Panel - perhaps there is a setting to enable this if it is supported in the driver.

  3. #3
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Touch events not recognized for trackpad

    Gestures are enabled. As I told before, I am using pinch zooming in the web browser without any problems, two, three and four finger gestures also work fine. The issue seems to occur in Qt applications only.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Touch events not recognized for trackpad


  5. #5
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Touch events not recognized for trackpad

    Umh... but why Qt samples do not work?

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Touch events not recognized for trackpad

    Our posts are bumping into each other.

    The examples may not implement gesture grabbing as mentioned above.

  7. #7
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Touch events not recognized for trackpad

    Thanks, i will check QGestureRecognizer.

  8. #8
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Touch events not recognized for trackpad

    Reading deeper into the docs, QGestureRecognizer is needed only if you are implementing custom gestures. QWidget::grabGesture() should be all you need for standard gesture support.

    Try modifying one of the Qt Graphics / View examples to add grabGesture support to the view widget, see what happens. Or modify a dialog-based example to add grabGesture to the dialog class. You should then be able to tap buttons, I think. I don't have a gesture input device, so I can't try it.

Similar Threads

  1. Capturing Touch Screen events in MainWindow
    By lightydo in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2013, 15:23
  2. Replies: 1
    Last Post: 18th July 2013, 13:23
  3. Replies: 0
    Last Post: 18th November 2010, 16:48
  4. QGraphicsProxyWidget and touch events
    By johnsoga in forum Qt Programming
    Replies: 0
    Last Post: 21st February 2010, 06:53
  5. How to Implement the Touch Screen Events?
    By rchaitanya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 25th December 2008, 09:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.