QT移植总结

1 篇文章 0 订阅

做了很多次Qt的移植,都没做记录,所以每次都会在几个差不多的问题上浪费很多时间。


写点东西做备份来用


1.qt-arm编译:

    下载了  qt-everywhere-opensource-src-4.8.5  ,

    写了个脚本添加 : ./configure -force-pkg-config -prefix /opt/qt-4.8.5-arm -embedded arm - release -shared -fast -no-largefile -qt-sql-sqlite -qt3support -no- xmlpatterns -no-glib -no-phonon -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg - webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libjpeg -make libs -nomake examples -nomake docs -nomake demo -no-nis -no-cups -iconv -no-dbus - openssl -xplatform qws/arm-linux-gnueabi-g++ -little-endian -qt-freetype - depths 16,24,32 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no- gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-kbd-qvfb -armfpa -no-mouse- qvfb -no-pch -qt-mouse-linuxtp -qt-mouse-tslib -DQT_QLOCALE_USES_FCVT -I / root/A20/lichee/buildroot/target/dragonboard/sysroot/usr/include -L /root/ A20/lichee/buildroot/target/dragonboard/sysroot/usr/lib

     使用的arm-linux-gcc 4.4.1  在ubuntu12.04 64位下编译报错 , 之后换了32位系统的就OK了



2.qt-creator 安装

    使用qt-creator-linux-x86_64-opensource-2.8.1.run 安装完成后添加PC版的Qmake(用的第一个qt 直接./configure && make && make install) 


    编译出来运行在PC的Qt程序很丑  在终端下 apt-get install libqt4-dev libqt4-dbg libqt4-gui libqt4-sql qt-dev-tools qt4-doc  qt4-designer qt4-qtconfig  ,可能大部分和之前安装的qt有重复 ,可以尝试下就install qt4-qtconfig


3.arm板配置

    ts和大部分的参数网上都很多 , 主要是移植后字体变小, 方法一在Qt程序里使用add.font ,  方法二在环境变量添加:

    export  QWS_DISPLAY="LinuxFb:mmHeight=125:mmWidth=139"

    export QWS_SIZE=480*800,我用的是7寸的板子,字体看着差不多。


4.运行

    在板子的/etc/profile 添加 xx -qws &  , 开机后台自启动运行qt程序


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值