第一部分,触摸屏
命令 lsinput (有些系统不移植)查看系统input实践
命令ox -d /dev/input/event1 或hexdump -d /dev/input/event1 (从上图看,event0没有接的触屏) ,点击屏幕如下
命令 ls /dev/input -al , 查看input设备的触摸屏软连接。
命令cat /etc/udev/rules.d/local.rules , 查看touchscreen0软连接创建脚本
命令cat /etc/profile.d/tslib.sh (此位置仅限于ti的开发板),查看qt使用的tslib指定的触摸屏touchscreen0,由上一个脚本决定绑定哪个event 。可以指定第二个触摸屏event1.
不支持lsinput命令,则使用命令cat /proc/bus/input/devices 查询响应的event编号
EV=b
第二部分,linguist
1.查找Ubuntu 上linguist安装位置 ,在qt安装目录Qt5.6.2/下 find . -name linguist ,可以查到linguist执行文件目录,~/Qt5.6.2/5.6/gcc_64/bin
2.建立软连接 ln -s(T) ~/Qt5.6.2/5.6/gcc_64/bin ~/linguist ,注意源必须用绝对路径
3. 使用翻译
方法一:进入 ~/linguist ,执行 ./lupdate 路径/project.pro 、 ./linguist 、 ./lrelease 路径/project.pro
方法二: lupdate 和 lrelease 已经移植为默认命令,在任何目录下可执行,中间的linguist可以用windows linguist工具或方法一中的linguist翻译 。
注意:大部分情况,lupdate会保留以往翻译的内容,个别情况下需要全部翻译。原因未知