How to locate the missing font directory in QFontDatabase error message?

2026-06-09 11:591阅读0评论SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计211个文字,预计阅读时间需要1分钟。

How to locate the missing font directory in QFontDatabase error message?

银行河马V10+SP1+2203,飞腾CPU D2000/8,安装完Qt 5.9.9后,程序运行发现只有界面没有文字,提示Cannot find font directory /home/yw/Qt5.9.9/lib/fonts. Note that Qt no longer ships fonts. 原因:字体缺失+解决。


银河麒麟V10 SP1 2203, 飞腾CPU D2000/8. 安装完Qt 5.9.9之后,程序运行发现只有界面没有文字,提示

Cannot find font directory /home/yw/Qt5.9.9/lib/fonts. Note that Qt no longer ship fonts.

How to locate the missing font directory in QFontDatabase error message?

原因:字体缺失

解决方案:

1. 从别处找一些字体文件,例如其他Windows电脑上的C:\Windows\Fonts下面的ttf文件。

2. 在Qt安装目录的lib文件夹下新建文件夹,名称为fonts

3. 将ttf文件拷贝至../lib/fonts文件夹

重新运行程序,显示正常了。


本文共计211个文字,预计阅读时间需要1分钟。

How to locate the missing font directory in QFontDatabase error message?

银行河马V10+SP1+2203,飞腾CPU D2000/8,安装完Qt 5.9.9后,程序运行发现只有界面没有文字,提示Cannot find font directory /home/yw/Qt5.9.9/lib/fonts. Note that Qt no longer ships fonts. 原因:字体缺失+解决。


银河麒麟V10 SP1 2203, 飞腾CPU D2000/8. 安装完Qt 5.9.9之后,程序运行发现只有界面没有文字,提示

Cannot find font directory /home/yw/Qt5.9.9/lib/fonts. Note that Qt no longer ship fonts.

How to locate the missing font directory in QFontDatabase error message?

原因:字体缺失

解决方案:

1. 从别处找一些字体文件,例如其他Windows电脑上的C:\Windows\Fonts下面的ttf文件。

2. 在Qt安装目录的lib文件夹下新建文件夹,名称为fonts

3. 将ttf文件拷贝至../lib/fonts文件夹

重新运行程序,显示正常了。