[Qt-interest] Qt embeded and touch events.

Tom Green tgreen at digecor.com
Thu Oct 20 23:57:05 CEST 2011


All,

I have qt-everywhere-opensource-src-4.7.1 built and installed on my system.  I've configured it as an embedded system and enabled the tslib touch screen driver in the build.  When in a widget I try to capture touch events or gesture events I never receive them.  I explicitly set Qt::WA_AcceptTouchEvents in my widget.  I have also looked at the code for the gesture system.  It also attempts to set the AcceptTouchEvents flag.  As I further look at the QT source in qwidget.cpp, at the bottom of setAttribute() the code to register a touch window is surrounded like so:

#if defined (Q_WS_WIN) || defined(Q_WS_MAC) || defined (Q_OS_SYMBIAN)
   if (on)
      d->registerTouchWindow();
#endif

so, since my program is embedded and it is Q_WS_QWS it never performs the registration, and thus I never receive touch events.  What do I need to do in an embedded system to be able to actually catch touch events?

Tom



More information about the Qt-interest-old mailing list