使用自定义字体
要在设备上预览用户界面时使用自定义字体,必须将字体导入到项目文件夹中。Qt Creator 会将字体与用户界面一起部署到设备上。
注意: 如果计划将流水号制作成动画,请使用固定宽度的字体,这样数字变化时就不会在屏幕上跳动。
添加字体:
- 选择Assets >
。 - 浏览到包含字体文件的文件夹并选择它们,然后选择Open 。
- 在Add Resources 对话框中选择保存文件的位置。
- 选择OK 保存字体。
字体将添加到Properties 中Font 属性的字体列表中。
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.