当前位置:网站首页>QT add external font ttf
QT add external font ttf
2022-04-23 18:15:00 【Talent、me】
Get local font
#include <QFontDatabase>
QFontDatabase fontbase;
// Traverse local font
foreach (const QString &fontfamily, fontbase.families()) {
qDebug()<<fontfamily;
}
Set the font used by the program
//"DejaVu Sans Mono" This is one of the word libraries found by the last traversal
QFont font("DejaVu Sans Mono");
QApplication::setFont(font);
Add external font ttf To the system font
Because my program is in arm Executed under , So first we need to find font The path where the font is stored .
The path of my development board is /usr/lib/fonts . Put the word library under this path and give permission :chmod 777 xxx.ttf
following kacstOne It's my transplanted font

版权声明
本文为[Talent、me]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210610471764.html
边栏推荐
猜你喜欢

JD-FreeFuck 京东薅羊毛控制面板 后台命令执行漏洞

.105Location

Using files to save data (C language)

SSD硬盘SATA接口和M.2接口区别(详细)总结

re正则表达式

Dynamically add default fusing rules to feign client based on sentinel + Nacos

logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours

Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)

String function in MySQL

Re regular expression
随机推荐
C byte array (byte []) and string are converted to each other
Selenium + phantom JS crack sliding verification 2
NVIDIA Jetson: GStreamer and openmax (GST OMX) plug-ins
Resolve the error Max virtual memory areas VM max_ map_ count [65530] is too low, increase to at least [262144]
Batch export ArcGIS attribute table
Hard core parsing promise object (do you know these seven common APIs and seven key questions?)
Permission management with binary
Svn simple operation command
Gobang game based on pyGame Library
ArcGIS table to excel exceeds the upper limit, conversion failed
C language to achieve 2048 small game direction merging logic
软件测试总结
MATLAB小技巧(6)七种滤波方法比较
Re regular expression
How to ensure the security of futures accounts online?
powerdesigner各种字体设置;preview字体设置;sql字体设置
How to install jsonpath package
Pointers in rust: box, RC, cell, refcell
According to the result set queried by SQL statement, it is encapsulated as JSON
【ACM】376. 摆动序列