当前位置:网站首页>在QML中加载不同字体
在QML中加载不同字体
2022-07-02 03:03:00 【Fu_Lin_】
之前加载不同的字体都是通过Qt代码设置,如下
QFontDatabase::addApplicationFont("XXXXXX/DroidSansFallback.ttf")
后面发现很多时候都不太起作用, 如果加载一个字体还好一点,加载多个好像就不起作用,后面翻阅文档,发现有专门对应Qml字体的组件FontLoader
,FontLoader
的说明FontLoader
可以通过名字
、本地路径
、网络url路径
三种方式加载字体。
//通过名字,加载系统安装的字体
FontLoader {
id: fixedFont; name: "Courier" }
边栏推荐
- How to develop digital collections? How to develop your own digital collections
- After marriage
- Render header usage of El table
- SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
- 超图iServer rest服务之feature查询
- Basic 01: print string
- Qualcomm platform WiFi -- Native crash caused by WiFi
- 【JVM】创建对象的流程详解
- [learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
- Addition without addition, subtraction, multiplication and division (simple difficulty)
猜你喜欢
Baohong industry | 6 financial management models at different stages of life
使用 useDeferredValue 进行异步渲染
2022-2028 global human internal visualization system industry research and trend analysis report
只需简单几步 - 开始玩耍微信小程序
C reflection practice
STM32__05—PWM控制直流电机
Which kind of sports headphones is easier to use? The most recommended sports headphones
[question 008: what is UV in unity?]
MVVM and MVC
2022-2028 global wood vacuum coating machine industry research and trend analysis report
随机推荐
Leetcode question brushing (10) - sequential question brushing 46 to 50
A list of job levels and salaries in common Internet companies. Those who have conditions must enter big factories. The salary is really high
实现一个自定义布局的扫码功能
连通块模板及变式(共4题)
tarjan2
2022-2028 global human internal visualization system industry research and trend analysis report
2022-2028 global manual dental cleaning equipment industry research and trend analysis report
Mongodb base de données non relationnelle
Learning notes of software testing -- theoretical knowledge of software testing
Rotating frame target detection mmrotate v0.3.1 learning model
New programmer magazine | Li Penghui talks about open source cloud native message flow system
Cache processing scheme in high concurrency scenario
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
创业了...
Jointly developed by nailing, the exclusive functions of glory tablet V7 series were officially launched
STM32__ 05 - PWM controlled DC motor
Share the basic knowledge of a common Hongmeng application
What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
Realize the code scanning function of a custom layout
Possible causes of runtime error