Chinaunix首页 | 论坛 | 博客
  • 博客访问: 109321
  • 博文数量: 29
  • 博客积分: 447
  • 博客等级: 下士
  • 技术积分: 414
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-05 23:03
个人简介

整天捣鼓嵌入式,兼职搞搞iOS,这么折腾为了啥?都是为了俺的娃!

文章分类

分类: 嵌入式

2016-06-12 22:27:33

配置脚本
----------------------------------------------------------------------
#!/bin/sh
TOUCH_DEVICE=/dev/event2 #触摸屏输入设备
MOUSE_DEVICE=/dev/mice  #鼠标输入设备
KB_DEVICE=/dev/event0  #键盘输入设备
FB_DEVICE=/dev/fb0   #显示屏输出设备
FB_SIZE=800x480    #显示屏分辨率

###配置tslib环境变量
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=$TOUCH
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_FBDEVICE=$FB_DEVICE
export TSLIB_CONSOLEDEVICE=none

###Linux环境变量
export LD_PRELOAD=/lib/preloadable_libiconv.so
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$TSLIB_ROOT/lib/ts:$LD_LIBRARY_PATH
export PATH=$PATH:$TSLIB_ROOT//bin

###QT5环境变量
export QTDIR=/opt/qt-5.5.1
export QT_QPA_PLATFORM=linuxfb:tty=${FB_DEVICE}:size=${FB_SIZE};mmSize=${FB_SIZE}:offset=0x0
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/platforms
export QT_QPA_FONTDIR=$QTDIR/lib/fonts
export QT_QPA_GENERIC_PLUGINS=tslib:${TOUCH_DEVICE}
----------------------------------------------------------------------
运行QT5程序
#/run/qt5_app

遇到的错误:
1.QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
  QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
  解决办法:export LD_PRELOAD=/lib/preloadable_libiconv.so
2.Couldnt load module pthres
  ts_config() failed (No such file or directory)
  解决办法:去掉export QT_QPA_GENERIC_PLUGINS=tslib:/dev/event2,可是触摸屏无法使用了!


阅读(3680) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~