当前位置:网站首页>QT Chinese and English use different fonts respectively
QT Chinese and English use different fonts respectively
2022-06-25 23:36:00 【The struggle history of polar bear】
Make a note of Qt Use style sheets to specify Chinese 、 How to use different fonts in English .
Look at the effect :

It's very simple :
lablel->setStyleSheet(QString("QLabel{ font-family:'Roman, Chinese Xingkai '; font-size: 16pt; color: red; }");
Just set multiple font names , The middle is separated by commas .
Be careful : Set the English font first , Then set the Chinese font , such qt Will first look in the first font , If you can't find it, go to the second font .
Record it again Qt The method of setting fonts for the software as a whole :
stay main Add the following code to the function :
QFont ff("Times New Roman, SimSun, SimSun-ExtB");
app.setFont(ff);
Finally, record Qt At high resolution , Font anti aliasing method , Visual inspection of this method in qt5.15 The above version is valid
newly build qt.conf file , The content of the document is :
[Platforms]
WindowsArguments = fontengine=freetype
And then qt.conf Put... Into the project qrc In the resource file , Resource path is :
:/qt/etc/qt.conf
Recompile to generate executable file
边栏推荐
- [opencv450 samples] inpaint restores the selected region in the image using the region neighborhood
- Konva series tutorial 2: drawing graphics
- 解决TypeError: Unicode-objects must be encoded before hashing
- 问题记录与思考
- Problem recording and thinking
- Implementation of sequence table: static and dynamic
- How to add cartoon characters to the blog park?
- A. Balance the Bits--Codeforces Round #712 (Div. 1)
- User interaction scanner usage Advanced Edition example
- Multithreaded learning 2- call control
猜你喜欢

ACM. HJ16 购物单 ●●

Idea auto generator generates constructor get/set methods, etc

CAD中图纸比较功能怎么用

CSDN添加页内跳转和页外指定段落跳转

UE4_UE5结合offline voice recognition插件做语音识别功能
![Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]](/img/3a/fb3bfe673db5123e3124404f3905c0.png)
Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]

Multithreaded learning 2- call control

Efr32bg22 ble module (low power Bluetooth communication module) at command test

二进制、16进制、大端小端

Problem recording and thinking
随机推荐
Konva series tutorial 2: drawing graphics
Basic operator
Summary of common JDBC exceptions and error solutions
Episode 3: thread synchronization using thread lock
Technology blog site collection
[2023 proofreading and bidding questions] Part 1: Measurement Technology FPGA post (roughly analytical version)
CDN加速是什么
Go语言逃逸分析全纪录
Efr32bg22 ble module (low power Bluetooth communication module) at command test
OBS-Studio-27.2.4-Full-Installer-x64.exe 下载
LeetCode-1528-重新排列字符串-哈希表-字符串
Problem recording and thinking
Live800在线客服系统:跨越时空做生意,从每次互动开始
UE4_ Ue5 combines the offline voice recognition plug-in for speech recognition
Windows redis installation and simple use
【opencv450-samples】读取图像路径列表并保持比例显示
CSDN添加页内跳转和页外指定段落跳转
konva系列教程2:绘制图形
树状类查询组件
[opencv450 samples] read the image path list and maintain the proportional display