Results 1 to 5 of 5

Thread: How to capture touch event on pushbutton widgets and lineedit widgets

  1. #1
    Join Date
    May 2013
    Posts
    20
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Exclamation How to capture touch event on pushbutton widgets and lineedit widgets

    used installeventfilter on all pushbutton widget
    void QObject::installEventFilter ( QObject * filterObj )

    and handled them with eventFilter() function
    bool KeyPressEater::eventFilter(QObject *obj, QEvent *event)
    {

    }

    whenever installeventfilter is applied to pushbutton widget it is disappearing from the application but the eventFilter() is handling whenever touchevent is occuring at the location the widget is placed.

    is their any solution for handling touch events???

  2. #2
    Join Date
    May 2013
    Posts
    20
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question qt touch event handling

    hi,

    i have been reading lot of discussions on this forum saying touch events are internally handled by mouse pressed event, but pressed signal on the widget is not getting handedpver to the slot (in connect-slot) during the test i have executed.

    also tried with eventhandlers by manually using installeventfilter on pushbutton widget
    i.e,
    void QObject::installEventFilter ( QObject * filterObj )

    and handling them with eventFilter() function
    bool KeyPressEater::eventFilter(QObject *obj, QEvent *event)
    {

    }

    whenever installeventfilter is applied to pushbutton widget it is disappearing during execution time.

    is their any solution for handling touch events???

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qt touch event handling

    Quote Originally Posted by maverick View Post
    whenever installeventfilter is applied to pushbutton widget it is disappearing during execution time.
    Maybe you are returning "true" for widget events such as paint, etc., thus filtering them out and not letting them reach the widget?

    Cheers,
    _

  4. #4
    Join Date
    May 2013
    Posts
    20
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: qt touch event handling

    my bad.......pressed() signal was working, but their is problem with touch point input to qt...so it has been taking wrong location of touchpoint to the one which is actually touched...

    how to get the exact point of touch, Since the ts_calibrate has been done and also

    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event1
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
    export QWS_MOUSE_PROTO=tslib:/dev/input/event1

    environment variable have been exported.

    still their is difference in touch input..

  5. #5
    Join Date
    May 2013
    Posts
    20
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question capture touch point

    it has been taking wrong location of touchpoint to the one which is actually touched...

    how to get the exact point of touch, Since the ts_calibrate has been done and also

    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event1
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
    export QWS_MOUSE_PROTO=tslib:/dev/input/event1

    environment variable have been exported.

    still their is difference in touch input..

Similar Threads

  1. Replies: 0
    Last Post: 30th April 2012, 15:17
  2. Replies: 3
    Last Post: 10th June 2010, 08:35
  3. Replies: 5
    Last Post: 18th April 2010, 23:31
  4. QGraphicsView, OpenGL widgets and event handling
    By Groovounet in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2010, 20:52
  5. Event Filtering on Widgets
    By QbelcorT in forum Newbie
    Replies: 1
    Last Post: 28th November 2008, 21:27

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.