export QT_QPA_FONTDIR=/usr/share/fonts/truetype
时间: 2023-08-12 13:04:56 浏览: 157
QT_linux.rar_qt cortex
在Ubuntu中,可以在/usr/share/fonts/truetype目录下找到下载的字体库。如果你想将字体库拷贝到imx6板子的/usr/lib/fonts/目录中,可以按照以下步骤进行操作:首先,将需要的字体库(比如wqy-microhei.ttc)复制到imx6板子的/usr/lib/fonts/目录中。然后,使用sudo vi /etc/profile命令编辑/etc/profile文件。在文件中添加以下内容:
export QT_QPA_FONTDIR=/usr/share/fonts/truetype
保存文件并退出编辑器。这样,你就将QT_QPA_FONTDIR环境变量设置为/usr/share/fonts/truetype目录。这样,Qt应用程序就能够找到并使用该目录下的字体库了。请注意,这只是一种配置方法,具体的路径和文件名可能会有所不同,取决于你的系统设置和字体库的位置。\[1\]
#### 引用[.reference_title]
- *1* [【Qt】Qt5.x移植后的环境配置(imx6)](https://blog.csdn.net/u010168781/article/details/79700777)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [qt开发遇QFontDatabase: Cannot find font directory /home/tgm/qt/qt_sdk/lib/fonts. Note that Qt no ...](https://blog.csdn.net/weixin_45746588/article/details/108196061)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Qt5.x移植后的环境配置(imx6)](https://blog.csdn.net/boyemachao/article/details/112506922)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文