下载 qt-everywhere-opensource-src-4.7.4.tar.gz

解压至arm Qt目录,与PC版,x86版分开

配置脚本: myconfig.sh

#!/bin/bash
#qt-gfx-transformed 选项实现窗口旋转
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.7.0-arm  -opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast -optimized-qmake -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-webkit -no-qvfb -no-phonon -no-nis -no-opengl -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake docs -qt-gfx-linuxfb -qt-gfx-transformed -D__ARM_ARCH_5TEJ__  -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib


前提编译好ts库

交叉编译器4.43 编译过程未见出错。

设置开发板相应环境变量,比如写入profile或 /usr/etc/rc.local,并在/etc/init.d/rcS中source一下

export QWS_DISPLAY=LinuxFB:mmWidth320:mmHeight480:0  纵向使用屏幕
export QWS_SIZE=320x480
export QWS_DISPLAY=Transformed:Rot270                                   窗体旋转
 
export QT_QWS_FONTDIR=/usr/local/Trolltech/QtEmbedded-4.7.0/lib/fonts
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0


-display参数来代替以上export的变量】

假如将运行的程序是qtdemo

qtdemo -qws -display "LinuxFB:mmWidth200:mmHeight100:0"

qtdemo -qws -display "Transformed:Rot90"

qtdemo -qws -display"Transformed:Rot90:LinuxFB:mmWidth200:mmHeight100:0"



Qt移植参考      http://blog.csdn.net/signsmile/article/details/5983347

屏幕旋转参考  http://www.qtcn.org/bbs/simple/?t47179.html
                         http://blog.sina.com.cn/s/blog_640531380100udhj.html


上电自动启动:在rc.local中调用相应程序即可









Logo

更多推荐