免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1347 | 回复: 0
打印 上一主题 下一主题

QT4.5配置触摸屏 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-11 23:03 |只看该作者 |倒序浏览

                                                                一.下载并编译tslib-1.4
tar xzvf tslib-1.4.tar.gzcd tslib/export CC=/usr/local/arm/3.4.1/bin/arm-linux-gccexport CXX=/usr/local/arm/3.4.1/bin/arm-linux-g++
./autogen.shexport PATH=/usr/local/arm/3.4.1/bin:$PATHecho "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --enable-inputapi=no  PLUGIN_DIR=/home/xura/freedom/opt/tslib/plugins -prefix=/home/xura/freedom/opt/tslib -host=arm-linux --cache-file=arm-linux.cache 2>&1 | tee conf_log
make 2>&1 | tee make_logmake installcp -fr /home/xura/freedom/opt/tslib /mnt/nfs/cd /mnt/nfs/tslib/etcvi ts.conf
去掉module_raw input前面的#号
二.测试tslib
进入minicom
vi setenv.sh
export T_ROOT=/mnt/nfs/tslib export LD_LIBRARY_PATH=$T_ROOT/lib export TSLIB_CONSOLEDEVICE=none export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_PLUGINDIR=$T_ROOT/lib/ts export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf export TSLIB_CALIBFILE=/mnt/yaffs/pointercal
保存退出.
. setenv
env 查看环境变量是否生效
cd bin./.....即可(几个测试例子)
三.编译QT4.5
可见http://blog.chinaunix.net/u2/86708/showart_1914581.html详解
在这里我们只用把configure改下就行,加进插件tslib
具体参数:
./configure  -prefix /mnt/nfs/QtEmbedded-4.5.0-arm -embedded arm -no-opengl -qt-mouse-tslib -I (我的tslib目录/include) -L (我的tslib目录/lib)
make
make install   注:(root用户)
四.最终的环境变量设置:
   export QTEDIR=/mnt/nfs/qte-arm   export T_ROOT=/mnt/nfs/tslib   export PATH=$QTEDIR/bin:$PATH   export TSLIB_CONSOLEDEVICE=none   export TSLIB_FBDEVICE=/dev/fb0   export TSLIB_TSDEVICE=/dev/input/event0   export TSLIB_PLUGINDIR=$T_ROOT/lib/ts   export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf   export TSLIB_CALIBFILE=/mnt/yaffs/pointercal   export QWS_MOUSE_PROTO=Tslib:/dev/input/event0   export LD_LIBRARY_PATH=$T_ROOT/lib:$QTEDIR/lib
参考:http://hi.baidu.com/rjz78/blog/item/a530ca01861d560b728da52d.html
               
               
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/86708/showart_1924834.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP