PDA

View Full Version : How to capture touch event on pushbutton widgets and lineedit widgets



maverick
30th January 2014, 15:30
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???

maverick
31st January 2014, 04:35
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???

anda_skoa
31st January 2014, 10:29
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,
_

maverick
2nd February 2014, 05:46
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..

maverick
2nd February 2014, 06:35
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..