Qt环境的搭建X11与Embedded(二)

2014-11-24 01:01:11 · 作者: · 浏览: 13
export QWS_DISPLAY="Transformed:mmWidth66:mmHeight114:Rot90:0"


FB_SIZE=$(cat /sys/class/graphics/fb0/virtual_size)


case "$FB_SIZE" in
800,480)
export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
;;
480,272)
export QWS_DISPLAY="LinuxFb:mmWidth76:mmHeight44:1"
;;
*)
#export QWS_DISPLAY="LinuxFb:mmWidth91:mmHeight53:1"
#7.0
#export QWS_DISPLAY="Transformed:Rot270:LinuxFb:mmWidth154:mmHeight86:1"
#3.5
export QWS_DISPLAY="Transformed:Rot270:LinuxFb:mmWidth70:mmHeight53:1"
;;
esac


file_path=`dirname $1`
file_name=`basename $1`
options=${@#$1}
cd $file_path
CMDPATH=`pwd`/
${CMDPATH}$file_name $options



---------------------------这是脚本------------------------



里面有些是外设的设置如:触摸屏,显示屏等,改成你板子相关的就行了,不配置也可以呀,不要这些功能呗。


把脚本拷到bin下去



那你就可以这样运行你的qt程序了(假设脚本名qt4.8.5 程序名 test)


qt4.8.5 test -qws


推荐阅读: