2009-08-27 23:53:51     Integrating Qt and Touchscreen

Document created by Aaronwu Employee on Aug 18, 2013
Version 1Show Document
  • View in full screen mode

2009-08-27 23:53:51     Integrating Qt and Touchscreen

David Kasper (UNITED STATES)

Message: 79333   

 

I am trying to integrate Qt with the touchscreen for the BF548 EZ-KIT using SVN 2009R1.  I am able to successfully run the touchscreen calibrate application (ts_calibrate).  I picked a simple Qt example (~/examples/painting/basicdrawing) and am able to get it to successfully display output onto the touchscreen.

 

However, I am having trouble making Qt respond when I press the touchscreen.  Nothing happens and the cursor just stays in the same spot.  I have setup the following environment variables:

 

    export TSLIB_FBDEVICE=/dev/fb0

    export TSLIB_CONSOLEDEVICE=none

    export TSLIB_CONFFILE=/etc/ts.conf

    export TSLIB_CALIBFILE=/etc/pointerc1

    export TSLIB_TSDEVICE=/dev/input/event1

    export QWS_MOUSE_PROTO=tslib

 

Also, this application assigns signals to slots in ~/examples/painting/basicdrawing/Window.cpp as follows:

 

    connect(shapeComboBox, SIGNAL(activated(int)), this, SLOT(shapeChanged()));

    connect(penWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(penChanged()));

    connect(penStyleComboBox, SIGNAL(activated(int)), this, SLOT(penChanged()));

    connect(penCapComboBox, SIGNAL(activated(int)), this, SLOT(penChanged()));

    connect(penJoinComboBox, SIGNAL(activated(int)), this, SLOT(penChanged()));

    connect(brushStyleComboBox, SIGNAL(activated(int)), this, SLOT(brushChanged()));

    connect(antialiasingCheckBox, SIGNAL(toggled(bool)), renderArea, SLOT(setAntialiased(bool)));

    connect(transformationsCheckBox, SIGNAL(toggled(bool)), renderArea, SLOT(setTransformed(bool)));

 

Does anybody know how to get the cursor to move on the touchscreen and select the spin boxes or suggest another example program?  Any help would be appreciated.

 

David Kasper

QuoteReplyEditDelete

 

 

2009-08-28 00:27:16     Re: Integrating Qt and Touchscreen

Sonic Zhang (CHINA)

Message: 79336   

 

Could you try to build everything into FDPIC instead of FLAT?

QuoteReplyEditDelete

 

 

2009-08-28 00:50:21     Re: Integrating Qt and Touchscreen

David Kasper (UNITED STATES)

Message: 79337   

 

Sonic,

 

The build configuration was already set to FDPIC.  I had to enable this in order to enable the tslib option.

 

David Kasper

QuoteReplyEditDelete

 

 

2009-09-03 23:13:41     Re: Integrating Qt and Touchscreen

David Kasper (UNITED STATES)

Message: 79593   

 

It looks like someone else had trouble getting input from the touchscreen, thread titled "Re: touchscreen BF548."  I am new to this topic.  Does anybody know if I need to execute configure as shown below (copied from above thread) from the Qt sources directory before making uClinux:

 

./configure -shared -depths 4,16,24,32 -no-cups -no-ipv6 -embedded bfin -little-endian -thread -qt-mouse-tslib -L/home/dam/blackfin-sources/uClinux/staging/usr/lib -I/home/dam/blackfin-sources/uClinux/staging/usr/include -lts -qvfb

 

Thanks,

 

David Kasper

QuoteReplyEditDelete

 

 

2009-09-03 23:23:40     Re: Integrating Qt and Touchscreen

Sonic Zhang (CHINA)

Message: 79594   

 

If you use 2009R1 release, no, you should just select QT library option in uClinux-dist menu config.

 

If you use 2008R1.5 and before, follow the document in our wiki.

QuoteReplyEditDelete

 

 

2009-09-03 23:28:23     Re: Integrating Qt and Touchscreen

Sonic Zhang (CHINA)

Message: 79595   

 

In order to enable -qt-mouse-tslib, you must also select touchscreen library before build.

QuoteReplyEditDelete

 

 

2009-11-07 11:47:24     Re: Integrating Qt and Touchscreen

David Kasper (UNITED STATES)

Message: 82182   

 

This is now fixed; per the Qt website tslib headers and library must be present in the build environment.  The touchscreen started working after I added the following lines to the makefile in uClinux/lib/qt-embedded:

 

       -L/home/kasper/work/svn/2009R1/uClinux-dist/staging/usr/lib \

       -I/home/kasper/work/svn/2009R1/uClinux-dist/staging/usr/include \

 

- David Kasper

Attachments

    Outcomes