使用自定义字体
若要在设备上预览 UI 时使用自定义字体,必须将字体导入项目文件夹。Qt Creator 会将这些字体与您的 UI 一起部署到设备上。
注意: 如果您计划对滚动数字进行动画处理,请使用 等宽字体,以免数字在变化时在屏幕上出现跳动现象。
要添加字体:
- 选择“Assets ” > “
”。 - 浏览至包含字体文件的文件夹并选中这些文件,然后选择“Open ”。
- 在“Add Resources ”对话框中选择文件的保存位置。
- 点击“OK ”以保存字体。
这些字体将被添加到Properties 中Font 属性的字体列表中。
另请参阅 《操作指南:设计Qt Quick 用户界面》、《Qt Quick 用户界面设计》以及《设计Qt Quick 用户界面》。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.