qt开发遇QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts. Note that Qt no longer
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.QFontDatabase
·
基于RK3399的arm64-Linux操作系统 QT开发笔记
交叉编译器qt源码:
参考这篇博客,写的挺全的:https://blog.csdn.net/dieju8330/article/details/86568144
我使用的是5.9.7版本的qt源码。
我使用的交叉编译器版本是aarch-linux-gnu- 7.5.0。
需要注意的是mkspecs文件夹中已经有了Linux-aarch64-gnu-g++的qmake.conf配置文件,所以我没有对这部分做更改。
最后得到的SDK。
最后遇到的问题:测试的时候报错:
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
解决办法:将开发板根文件系统里的/usr/share/fonts移到sdk/lib文件夹下。
然后 sudo vi /etc/profile
export QTDIR=/home/tgm/qt/qt_sdk #这里改成自己qt-sdk源码的路径
export QT_QPA_FONTDIR=$QTDIR/lib/fonts
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QWS_MOUSE_PROTO=/dev/input/event0
export QT_QPA_FONTDIR=$QTDIR/lib/fonts/truetype/dejavu
然后 source /etc/profile
我的根文件系统如下:
更多推荐
已为社区贡献2条内容
所有评论(0)