中标麒麟V7中的Qt5.9.2中CONFIG += console不显示中文的问题

环境

1、中标麒麟V7

2、系统自带的Qt Create 4.1.0(Based on Qt 5.9.2 (GCC 4.9.2 20141101 (NeoKylin 4.9.2-1), 64 bit))

3、.pro文件中配置了 CONFIG += console后控制台输不出中文的问题

解决方法

1、打开以下文件:

/etc/X11/Xresources

2、添加以下二行代码即可,其中字体“方正楷体_GBK”可执行 “fc-list”查看本机字体替换:

! This is the global resources file that is loaded when
! all users log in, as well as for the login screen

! Fix the Xft dpi to 96; this prevents tiny fonts
! or HUGE fonts depending on the screen size.
Xft.dpi: 96

! hintstyle: medium means that (for Postscript fonts) we
! position the stems for maximum constrast and consistency
! but do not force the stems to integral widths. hintnone,
! hintslight, and hintfull are the other possibilities.
Xft.hintstyle: hintmedium
Xft.hinting: true

!添加以下二行即可
xterm*faceNameDoublesize:方正楷体_GBK:antialias=True:pixelsize=15
xterm*faceName:Consolas:
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值