当前位置:网站首页>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
边栏推荐
- Calculation of fishing net road density
- Selenium + phantom JS crack sliding verification 2
- The difference between deep copy and shallow copy
- [UDS unified diagnostic service] v. diagnostic application example: Flash bootloader
- MATLAB小技巧(6)七种滤波方法比较
- Refcell in rust
- From source code to executable file
- Read excel, int digital time to time
- Auto. JS custom dialog box
- Docker 安装 MySQL
猜你喜欢
Data stream encryption and decryption of C
Vulnérabilité d'exécution de la commande de fond du panneau de commande JD - freefuck
A few lines of code teach you to crawl lol skin pictures
Robocode tutorial 8 - advanced robot
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
【ACM】376. Swing sequence
Robocode Tutorial 4 - robocode's game physics
Using files to save data (C language)
Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)
Robocode tutorial 5 - enemy class
随机推荐
Gson fastjason Jackson of object to JSON difference modifies the field name
Serial port debugging tools cutecom and minicom
Installation du docker redis
【ACM】509. Fibonacci number (DP Trilogy)
word frequency count
Implementation of k8s redis one master multi slave dynamic capacity expansion
From introduction to mastery of MATLAB (2)
Dock installation redis
Map basemap Library
MATLAB从入门到精通(二)
Re expression régulière
Flash operates on multiple databases
Robocode tutorial 8 - advanced robot
NVIDIA Jetson: GStreamer and openmax (GST OMX) plug-ins
【ACM】376. 摆动序列
proxy server
Realization of consumer gray scale
Software test summary
STM32学习记录0008——GPIO那些事1
Closure type of rust (difference between FN, fnmut and fnone)