本文共 787 字,大约阅读时间需要 2 分钟。
1、先保存原来/etc/profile
cp /etc/profile /etc/profile_org
2、修改profile
vi /etc/profile
在最后行加上
export TS_ROOT=/usr/local/tslibexport TSLIB_TSDEVICE=/dev/input/event2export TSLIB_CONFFILE=$TS_ROOT/etc/ts.confexport TSLIB_PLUGINDIR=$TS_ROOT/lib/tsexport TSLIB_CALIBFILE=/etc/pointercalexport TSLIB_CONSOLEDEVICE=noneexport TSLIB_FBDEVICE=/dev/fb0export QTDIR=/opt/qt-4.7.1export LD_LIBRARY_PATH=$QTDIR/lib:$TS_ROOT/lib:$LD_LIBRARY_PATHexport PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin:$QTDIR/bin:$TS_ROOT/biexport QT_PLUGIN_PATH=$QTDIR/pluginsexport QWS_MOUSE_PROTO=tslib:/dev/input/event2export QWS_DISPLAY=LinuxFb:mmWidth76:mmHeight44:1export QT_QWS_FONTDIR=$QTDIR/lib/fontsexport QWS_KEYBOARD=TTY:/dev/tty1export TSLIB_TSEVENTTYPE=H3600
source /etc/profile
3、重新运行QT程序
./HelloWorld -qws
转载地址:http://wglai.baihongyu.com/