QT版本:qt-embedded-linux-opensource-src-4.5.3
1、添加交叉编译
(1)copy qt-embedded-linux-opensource-src-4.5.3/mkspecs/qws/linux-arm-g++ 到 qt-embedded-linux-opensource-src-4.5.3/mkspecs/qws/linux-hisiv400-g++
(2)修改linux-hisiv400-g++/qmake.conf文件,把arm-linux替换成arm-hisiv400-linux
以下可以不用操作!!网文,感觉都是屏蔽一下应程序,而没有真正的减少qt库的大小,可以自己裁剪。
2、屏蔽不必要的库,网文如此描述,其实屏蔽不屏蔽这些库都没关系,屏蔽就是把库变小一点,嵌入式存储空间有限。甚至还可以进一步裁剪QT,让库更小。
(1)(记得备份)修改的qt-embedded-linux-opensource-src-4.5.3/examples目录下的examples.pro,屏蔽如下:去掉浏览器内核开发sample,不需要
#contains(QT_CONFIG, webkit): SUBDIRS += webkit 
(2)修改/qt-embedded-linux-opensource-src-4.5.3/demos目录下的demos.pro 屏蔽如下:去掉浏览器内核开发demo,不需要
#contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):SUBDIRS += demos_browser
3、
运行./configure -help ,查看我们需要设置那些选项。
-prefix 定义安装目录,可选(不选默认在/usr/local/Trolltech/QtEmbedded-4.5.3)
挑几个来说一下:
//定义生成的是.so还是.a库
 *  -shared ............ Create and use shared Qt libraries.(默认)
    -static ............ Create and use static Qt libraries.

//定义qt是否支持访问超过4GB的文件,看项目需求
    -no-largefile ...... Disables large file support.(默认)
 +  -largefile ......... Enables Qt to access files larger than 4 GB.
 //定义是否编译STL。
     -no-stl ............ Do not compile STL support.(默认)
 *  -stl ............... Compile STL support.
 //是否编译浏览器内核模块
  -no-webkit ......... Do not build the WebKit module.
 +  -webkit ............ Build the WebKit module.
 
 //是否支持编译OpenSSL
     -no-openssl ........ Do not compile support for OpenSSL.
 +  -openssl ........... Enable run-time OpenSSL support.
    -openssl-linked .... Enabled linked OpenSSL support.

下面看嵌入式专属的配置
//目标平台
 -xplatform target ... The target platform when cross-compiling.
 
 // arm
-embedded <arch> .... This will enable the embedded build, you must have a
  proper license for this switch to work.
  Example values for <arch>: arm mips x86 generic
//CPU是大端还是小端 arm和x86 小端, mips大端。  
 -little-endian ...... Target platform is little endian (LSB first).
    -big-endian ......... Target platform is big endian (MSB first).

// 是否字体库的设置
 -no-freetype ........ Do not compile in Freetype2 support.
 -qt-freetype ........ Use the libfreetype bundled with Qt.
 
具体:
./configure --prefix=/home/liqinghan/qt-embedded-linux-opensource-src-4.5.3/hisi_qt_install -no-pch -xplatform qws/linux-hisiv400-g++ -arch arm -embedded arm -no-freetype -qt-mouse-pc -no-webkit -no-largefile -fast -release -no-qt3support -no-cups  -no-opengl -no-phonon -phonon-backend -no-scripttools -no-libtiff -no-gif -no-libmng -no-nis -no-cups -no-svg

Type 'c' if you want to use the Commercial Edition. //非开源
Type 'o' if you want to use the Open Source Edition.//开源

#o

This is the Qt for Embedded Linux Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

#yes

编译完毕后!就会在hisi_qt_install下生成demo程序

注意修改:修改hifb,使用hifb0的ARGB8888的模式,以及非编码的模式,然后运行sample_hifb

挂在QT到root/test/目录下:
运行如下:
export QT_INSTALL_PATH=/root/test/qt-embedded-linux-opensource-src-4.5.3/hisi_qt_install
export LD_LIBRARY_PATH=/lib:/usr/lib:${QT_INSTALL_PATH}/lib:${LD_LIBRARY_PATH}
export QT_QWS_FONTDIR=${QT_INSTALL_PATH}/lib/fonts
export QT_QWS_DISPLAY=linuxFB:/dev/fb0

./xxxx -qws
服务程序运行时:
./mysecondserverapplication -qws -display "QVFb:2"
客户程序运行时:
./myclientapplication -display "QVFb:2"

若想在不同显示器移动应用程序,则只能通过Muti显示器实现。
./myserverapplication -qws -display "Multi: QVFb:0
QVFb:1:offset=0,0 VNC:offset=640,0 :2"

程序启动命令选项:
-fn<font>         定义程序的字体,例如./myapplication -fn helvetica

-bg<color>                设置程序默认背景颜色 例如./myapplication -bg blue,颜色名称必须能被QColor类构造函数识别

-btn<color>                设置默认的按钮颜色,例如./myapplication -btn green 同样颜色必须被认识

-fg<color>                设置foreground颜色,例如./myapplication -fg 'dark blue' 同上需被认识

-name <objectname>    设置应用程序名字 例如./myapplication -name texteditapplication

-title <title>        设置应用程序标题。./myapplication -title 'Text Edit'

-geometry <width>x<height>+<Xoffset>+<Yoffset>
设置窗口大小, ./myapplication -geometry 300x200+50+50

-keyboard                    启动键盘

-nokeyboard                关闭键盘

-mouse                        启动鼠标

-nomouse                    关闭鼠标

-qws                            设置为服务程序

-display                    设置显示器驱动

-decoration<style>
设置程序的风格,例如./myapplication -decoration windows,只支持windows default styled

剩下的就是QT界面简单的开发了,试运行了demos里面的几个APP,使用的参数是-qws 和 -fn helvetica 感觉速度流畅,鼠标操作不卡顿。

http://download.csdn.net/download/liqinghan/10218920

QT4.5.3移植到hi3536的更多相关文章

  1. Qt4.8.5移植

    这两天搞了Qt移植 因为不小心 耽误了挺多时间 但是也比较好的掌握了   现在记录一下 准备工具: tslib-1.16 qt-everywhere-opensource-src-4.8.5.tar ...

  2. iTOP-4412开发板qt4文件的移植和修改

    在 7.4 小节介绍配置文件的时候,提到迅为制作的触摸库文件“/usr/local/tslib”,迅为 已经将触摸功能编译到 Qt/E4.7.1 的库文件中,开发板可以支持触摸和鼠标功能. 用户在前面 ...

  3. FS210开发板上Qt4.7.0移植过程

    作者:冯老师,华清远见嵌入式学院讲师. 1. 搭建Qt开发环境平台 1.开发环境:ubuntu 12.04 2.交叉编译链:arm-cortex_a8-linux-gnueabi 3.开发板:FS21 ...

  4. 由Qt4.x项目移植到Qt5.x需要注意的事项

    The Transition from Qt 4.x to Qt 5 The transition from Qt 4.x to Qt 5 is not expected to be signific ...

  5. 海思QT4.8.0开发总结

    1.QT4.8.0移植 2.QT4.8.0界面的透明度设置 发现设置空间透明度时候,QT显示的绿色的背景,没有透明!设置如下: 在程序起始的地方设置: hisi_init(); QWSServer:: ...

  6. tiny4412移植opencv2.4.7手记

    在买了新的4412板子后.打算趁着刚成功在6410上移植过的经验,速度解决下.不想出现了各种问题.小结下: 1.关于opencv的移植: tiny4412的linux3.5上,须要把opencv的li ...

  7. Qt工具知多少(一目了然)

    一级题目: Qt Designer — 所见即所得的界面设计工具, 可以用拖拽的方式将控件排布在界面上,支持layout, 支持signal/slot编辑. 生成的文件保存为ui格式, ui是xml格 ...

  8. 【Qt】测测你对Qt的了解–Qt工具知多少

      原文:http://blog.163.com/lijiji_1515/blog/static/1268774462009103101944455/   你知道Qt都提供了哪些工具吗? 你知道Qt的 ...

  9. centos qt5,PyQt5 installation

    一.SIP http://www.riverbankcomputing.com/software/sip/download   二.Centos6.5 qt 安装 1,centos linux系统必须 ...

随机推荐

  1. EventBus vs Otto vs Guava--自定义消息总线

    同步发表于http://avenwu.net/ioc/2015/01/29/custom_eventbus Fork on github https://github.com/avenwu/suppo ...

  2. 大量删除MySQL中的数据

    出现的背景: 公司做了一个redis相关的项目,其中mysql存储了很多统计数据.比如客户端上报的数据,redis实例的数据,应用的数据,机器的数据等.每天都在上报,采集,由于没有定期删除,数据大量累 ...

  3. python concurrent.futures.Threadpoolexcutor的有界队列和无界队列

    1.默认是无界队列,如果生产任务的速度大大超过消费的速度,则会把生产任务无限添加到无界队列中,这样一来控制不了生产速度,二来是会造成系统内存会被队列中的元素堆积增多而耗尽. 2.改写为有界队列 cla ...

  4. 【!Important】Java线程死锁查看分析方法

    一.Jconsole Jconsole是JDK自带的图形化界面工具,使用JDK给我们提过的工具JConsole,可以通过cmd打开命令框然后输入Jconsole打开图形工具 然后点击检测死锁就可以查看 ...

  5. 使用Postmark测试后端存储性能

    Postmark用于对进行频繁,大量存取小文件的存储系统的存储性能测试.原理:构建一个测试文件池,通过文件最大,最小大小,数量等参数进行配置,然后进行事务的初始化,对每一个事务中读取/附加,创建/删除 ...

  6. url自动补全index.php

    location / { index index.html index.htm index.php l.php; autoindex on; if (!-e $request_filename) { ...

  7. java封装实现Excel建表读写操作

    对 Excel 进行读写操作是生产环境下常见的业务,网上搜索的实现方式都是基于POI和JXL第三方框架,但都不是很全面.小编由于这两天刚好需要用到,于是就参考手写了一个封装操作工具,基本涵盖了Exce ...

  8. Redhat7.5安装glusterfs4

    redhat7.5自带yum源不包含glusterfs4,下面通过rpm包的方式安装glusterfs4 环境查看 glusterfs官方网站下载rpm包下载地址 https://buildlogs. ...

  9. centos 安装教程 服务器配置教程 服务器中安装python 服务器中安装Django 安装MySQL 配置MySQL

    一 .解决python编译安装所需的软件依赖 yum install gcc patch libffi-devel python-devel  zlib-devel bzip2-devel opens ...

  10. shell脚本的基本结构以及如何执行

    1.shell脚本通常以.sh为后缀,不是说不带这个.sh脚本就不会执行,而是大家一种通用的命名规范而已 2.shell脚本中的第一行一定是:#! /bin/bash.该命令说明,该文件使用的是bas ...