Ads 468x60px

##EasyReadMore##

10 6月, 2013

setqt4env的調適: 執行 QT 程式有畫面卻不能觸控

今天一直在執行編好的 Qt 在 mini6410上跑
畫面有出來卻不能觸控
原來是範例檔(setqt4env)有誤
找到這一行
if [ -c /dev/touchscreen ]; then
改成
if [ -c ${TSLIB_TSDEVICE} ]; then

執行時出現錯誤
error while loading shared libraries: libQtGui.so.4: cannot open shared
object file: No such file or directory
代表 Qt4.7的庫的路徑不對
找到
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
改成
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib:$LD_LIBRARY_PATH

因為設備名稱不一定是 touchscreen 如果剛好觸控設備名稱剛好一樣就可以
完整設定檔如下
#!/bin/sh
if [ -e /etc/friendlyarm-ts-input.conf ] ; then
        . /etc/friendlyarm-ts-input.conf
fi
true    ${TSLIB_TSDEVICE:=/dev/touchscreen}
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE
export TSLIB_CONFFILE
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if [ -c ${TSLIB_TSDEVICE} ]; then
        export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
        if [ ! -s /etc/pointercal ] ; then
                rm /etc/pointercal
                /usr/bin/ts_calibrate
        fi
else
        export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root

0 意見:

張貼留言

 
Blogger Templates