Live & Learn
分类: LINUX
2016-08-23 15:37:29
【1、与qt程序显示文字大小有关的两项】
export QWS_DISPLAY=LinuxFB:mmWidth200:mmHeight100:0 //输出设备为Linux framebuffer,尺寸定义(尺寸定义与文字大小有直接关系)
export QWS_SIZE=480x272 //屏幕大小
【2、屏幕旋转】
export QWS_DISPLAY=Transformed:Rot90 //旋转90 可以旋转0、90、180、270
想让qt支持旋转,在编译嵌入式qt的时候要加上-qt-gfx-transformed选项
【3、举一反三:在屏幕旋转的同时保持文字大小】
export QWS_DISPLAY=Transformed:Rot90:LinuxFB:mmWidth200:mmHeight100:0
【4、用-display参数来代替以上export的变量】
假如将运行的程序是qtdemo
qtdemo -qws -display "LinuxFB:mmWidth200:mmHeight100:0"
qtdemo -qws -display "Transformed:Rot90"
qtdemo -qws -display "Transformed:Rot90:LinuxFB:mmWidth200:mmHeight100:0"
------------------sno:-----------------
当然也可以在配置文件中设置,如下:
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/usr/etc/pointercal
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONSOLEDEVICE=/dev/tty
export QTDIR=/usr/lib/QT
export LD_LIBRARY_PATH=$QTDIR:$LD_LIBRARY_PATH
export QT_QWS_FONTDIR=$QTDIR/fonts
export QT_PLUGIN_PATH=/usr/lib/QT/plugins
export QWS_MOUSE_PROTO=tslib:/dev/input/event1
export QWS_DISPLAY='Transformed:Rot90'
------------sno: 另一个别人的设置信息:
export PATH=/opt/Qtopia/bin:$PATH export LD_LIBRARY_PATH=/opt/Qtopia/lib:$LD_LIBRARY_PATH export QTDIR=/usr/local/QtArm export QPEDIR=/usr/local/QtArm export PATH=$QTDIR/bin:$PATH export LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=/usr/local/etc/ts.conf export TSLIB_PLUGINDIR=/usr/local/lib/ts export TSLIB_CALIBFILE=/etc/pointercal export QT_QWS_FONTDIR=/usr/local/QtArm/lib/fonts export QWS_MOUSE_PROTO="TSLIB:/dev/input/event0 USB:/dev/input/mice" export QWS_SIZE='320x240'
---------------------