qt界面窗口旋轉90度顯示

【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庫(如qte生成的Lib)的時候要加上-qt-gfx-transformed選項(有些文章說要加上-qt-gfx-transformed  -qt-gfx-linuxfb)

【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"

轉自http://blog.sina.com.cn/s/blog_640531380100udhj.html
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章