海思3520dv400交叉编译的配置文件:
-qt-freetype:字体支持tff
-qt-gfx-transformed :支持旋转
qws/linux-arm-hisiv500-g++ 为平台新建的目录
编译:
用make: 40分16秒
用make -j4:23分16秒
用make -j8:22分59秒
运行时问题:
1)
QWSSocket::connectToLocalFile could not connect:: No such file or directory
在可执行程序上增加 -qws
2)
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: Operation not permitted
解答:先要运行海思带的 fb sample/hifb
3)jpg图片不能显示,configure 配置 -qt-libjpeg
在/etc/profile中添加 plugins
export QT_INSTALL_PATH=/opt/qt
export LD_LIBRARY_PATH=/lib:/usr/lib:${QT_INSTALL_PATH}/lib:${LD_LIBRARY_PATH}
export QT_QWS_FONTDIR=${QT_INSTALL_PATH}/lib/fonts
export LD_LIBRARY_PATHI=/opt/qt/plugins/imageformats:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=/opt/qt/plugins
export LD_LIBRARY_PATH=$QT_INSTALL_PATH/plugins/imageformats:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$QT_INSTALL_PATH/plugins
#export QT_QWS_DISPLAY=linuxFB:/dev/fb0
在.pro工程中添加:
QTPLUGIN += qjpeg
即可显示jpg图片
4)取消qDebug()打印消息,在.pro中添加
DEFINES += QT_NO_WARNING_OUTPUT\
QT_NO_DEBUG_OUTPUT
5)QT应用程序启动出现以下错误
QWSServerSocket: could not bind to file /tmp/qtembedded-0/QtEmbedded-0
Error: File exists
Failed to bind to /tmp/qtembedded-0/QtEmbedded-0
网上提供的再内核中修改usock对本工程不起作用。
在启动qt引用程序的时候,加上一小段延时即可。