当前位置:网站首页>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
边栏推荐
- PowerDesigner various font settings; Preview font setting; SQL font settings
- 【ACM】376. Swing sequence
- Cells in rust share variable pointers
- Read excel, int digital time to time
- 线上怎么确定期货账户安全的?
- Batch export ArcGIS attribute table
- Implement a simple function to calculate the sum of all integers between M ~ n (m < n)
- Stanford machine learning course summary
- Rewrite four functions such as StrCmp in C language
- 深度学习经典网络解析目标检测篇(一):R-CNN
猜你喜欢
Solution to Chinese garbled code after reg file is imported into the registry
Visualization of residential house prices
String function in MySQL
Qtablewidget usage explanation
Gobang game based on pyGame Library
MATLAB从入门到精通(二)
Docker installation MySQL
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
Batch export ArcGIS attribute table
Spark performance optimization guide
随机推荐
Serial port debugging tools cutecom and minicom
Robocode tutorial 3 - Robo machine analysis
14 py games source code share the second bullet
Matlab tips (6) comparison of seven filtering methods
Arcpy adds fields and loop assignments to vector data
函数递归以及趣味问题的解决
Cygwin64 right click to add menu, and open cygwin64 here
【ACM】70. 爬楼梯
Excel opens large CSV format data
Rust: a simple example of TCP server and client
Crawling mobile game website game details and comments (MQ + multithreading)
Pyppeter crawler
Data stream encryption and decryption of C
Crawl the product data of cicada mother data platform
Re regular expression
Robocode Tutorial 4 - robocode's game physics
Qtablewidget usage explanation
Svn simple operation command
串口调试工具cutecom和minicom
C network related operations