Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4241770
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: 嵌入式

2011-04-13 22:35:20

在  2440+2.6.33 QT-4.5.3移植 (十) 这篇博文中,最后有一个重大的问题:

  补充1:不能显示中文字体
 
  补充2.
可以进入 校正程序,可以正常校验,可以使用 ts_test 测试,这说明 触摸屏驱动移植成功了,但是当执行自己的hello_cn 程序时,光标不能随着 触摸笔移动。所以我在此进行的移植。



这里补充 第十篇章 不同的地方

1.解决能显示中文  参考 TQ6410_QT4.7移植手册.pdf  中文解决篇章

  1.1 下载 文泉译 中文源码
  

  1.2 解压 wqy-zenhei-0.8.38-1.tar.gz
    tar zxfv wqy.tar.gz

  1.3 复制 wqy  .ttc  到 文件系统 /opt/qt-4.5/lib/fonts 库

  1. root@yuweixian:/home/ywx/yu/qt/wqy-zenhei# cp wqy-zenhei.ttc /opt/me_linux/root-2.6.33-new/opt/qt-4.5/lib/fonts/
  1.4 这样就解决了 中文不能显示的问题了。


2.解决 光标不能移动问题

1.首先是 opensource-src-4.5.3 源码安装时,需要选择上
  qt-mouse-tslib -qt-mouse-pc  ,只要选择上这两个就可以了

参考:[转载]QT4.6.3触摸屏可以移动鼠标但无法产生鼠标点击信号

2.我这里只贴上 修改过的 /etc/profile 和 /bin/qt4 文件内容
 profile
  1. # Ash profile
  2. # vim: syntax=sh

  3. # No core files by default
  4. #ulimit -S -c 0 > /dev/null 2>&1

  5. ######################################
  6. export set HOME=/root
  7. export set QTDIR=/opt/qt-4.5
  8. export set QPEDIR=/opt/qt-4.5
  9. export set QWS_DISPLAY="LinuxFB:/dev/fb0"
  10. export set QWS_DISPLAY="LinuxFB:mmWidth130:mmHeight100:0"
  11. export set QWS_KEYBOARD="TTY:/dev/tty1"

  12. ##########add tslib#############
  13. if [ -f /sys/devices/platform/uevent ] ; then
  14.     export set TSLIB_TSDEVICE=/dev/event0
  15.     export set TSLIB_CONFFILE=/etc/ts.conf
  16.     export set TSLIB_PLUGINDIR=/opt/qt-4.5/lib/ts  ####这里修改过
  17.     export set TSLIB_CALIBFILE=/etc/pointercal
  18.     export set QWS_MOUSE_PROTO="TSLIB:/dev/event0 Intellimouse:/dev/mouse0"
  19. else
  20.     export set QWS_MOUSE_PROTO="Intellimouse:/dev/mouse0"
  21. fi
  22. ###########end tslib##############
  23. export set QT_PLUGIN_PATH=$QTDIR/plugins/
  24. export set QT_QWS_FONTDIR=$QTDIR/lib/fonts
  25. export set PATH=$QPEDIR/bin:$PATH
  26. export set LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/plugins/imageformats:$LD_LIBRARY_PATH

  27. #######################################


  28. USER="`id -un`"
  29. LOGNAME=$USER
  30. PS1='[\u@\h \W]# '
  31. PATH=$PATH

  32. HOSTNAME=`/bin/hostname`

  33. export USER LOGNAME PS1 PATH


qt4

  1. #!/bin/sh

  2. echo Start qt-4.5 > /dev/ywx_serial0

  3. export set HOME=/root
  4. export set QTDIR=/opt/qt-4.5
  5. export set QPEDIR=/opt/qt-4.5
  6. export set QWS_DISPLAY="LinuxFB:/dev/fb0"
  7. export set QWS_DISPLAY="LinuxFB:mmWidth130:mmHeight100:0"
  8. export set QWS_KEYBOARD="TTY:/dev/tty1"

  9. #########add tslib###################
  10. if [ -f /sys/devices/platform/uevent ] ; then
  11.     export set TSLIB_TSDEVICE=/dev/event0
  12.     export set TSLIB_CONFFILE=/etc/ts.conf
  13.     export set TSLIB_PLUGINDIR=//opt/qt-4.5/lib/ts         ###这里修改过
  14.     export set TSLIB_CALIBFILE=/etc/pointercal
  15.     export set QWS_MOUSE_PROTO="TSLIB:/dev/event0 Intellimouse:/dev/mouse0"
  16. else
  17.     export set QWS_MOUSE_PROTO="Intellimouse:/dev/mouse0"
  18.     if [ -f /etc/pointercal ] ; then
  19.         echo only use mouse > /dev/ywx_serial0
  20.     else
  21.         echo "1 0 1 0 1 1 65536" >/etc/pointercal
  22.     fi
  23. fi
  24. ##########end tslib##################
  25. export set QT_PLUGIN_PATH=$QTDIR/plugins/
  26. export set QT_QWS_FONTDIR=$QTDIR/lib/fonts
  27. export set PATH=$QPEDIR/bin:$PATH
  28. export set LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/plugins/imageformats:$LD_LIBRARY_PATH

  29. if [ -f /etc/pointercal ] ; then
  30.     $QPEDIR/bin/hello_cn -qws 1>/dev/null 2>/dev/null
  31. else
  32.     ts_calibrate
  33.     $QPEDIR/bin/hello_cn -qws 1>/dev/null 2>/dev/null
  34. fi


  35. #$QPEDIR/bin/hello_cn -qws 1>/dev/null 2>/dev/null



4.修改过的文件系统 qt-4.5 中的内容

  1. [root@yuweixian qt-4.5]# ls
  2. bin lib plugins
  3. [root@yuweixian qt-4.5]#
  4. [root@yuweixian qt-4.5]# cd lib/
  5. [root@yuweixian lib]# ls
  6. fonts libQtGui.so.4 libQtNetwork.so.4.5.3
  7. libQtCore.so libQtGui.so.4.5 libts-0.0.so.0
  8. libQtCore.so.4 libQtGui.so.4.5.3 libts-0.0.so.0.1.1
  9. libQtCore.so.4.5 libQtNetwork.so libts.so
  10. libQtCore.so.4.5.3 libQtNetwork.so.4 pkgconfig
  11. libQtGui.so libQtNetwork.so.4.5 ts
  12. [root@yuweixian lib]#
  13. [root@yuweixian qt-4.5]# cd plugins/
  14. [root@yuweixian plugins]# ls
  15. accessible iconengines imageformats sqldrivers
  16. [root@yuweixian plugins]#



5.结果

  正常可以进入 校正界面  ,可以 运行 hell0_cn 程序,光标可以随着 触摸笔 移动,但是 usb 鼠标不能使用,usb 鼠标不能使 光标移动。





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