Qt4.7 arm-linux移植,屏幕旋轉


下載 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中調用相應程序即可









發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章