嵌入式开发者社区

标题: 你们提供的qt做的界面不能显示中文 [打印本页]

作者: 小鱼儿    时间: 2015-6-19 09:16
标题: 你们提供的qt做的界面不能显示中文
qt设计的界面,有中文不能显示
作者: tenny    时间: 2015-6-23 17:32
1、将中文字体文件拷贝到 /usr/lib/fonts目录3 E2 G  e8 J( o  r

3 ~$ G7 o0 P( R/ d5 Z9 l; _' x2、export QT_QWS_FONTDIR=/usr/lib/fonts5 A2 l9 f" ^3 c7 G" l! D
可将以上提到的shell加入到 /etc/profile 文件中
作者: 小鱼儿    时间: 2015-6-24 09:12
tenny 发表于 2015-6-23 17:32- }+ B+ d6 l6 L
1、将中文字体文件拷贝到 /usr/lib/fonts目录5 Q9 C0 Y! T% ~$ l( b
* h4 @4 H" f) v% Q* s! K
2、export QT_QWS_FONTDIR=/usr/lib/fonts
! }9 k, }; B2 g6 y+ k
能不能把中文字体文件提供下好不好,在哪里下载啊
作者: tenny    时间: 2015-6-24 13:23
windows 系统下
: q# X* ]. p1 t1 B$ DC:\Windows\Fonts& p5 V/ f2 q+ H, P; A6 u4 C) r
linux 系统下
0 f$ Y& d2 `8 ]4 P3 A" ?/usr/share/fonts
作者: 小鱼儿    时间: 2015-6-24 17:44
tenny 发表于 2015-6-24 13:23
. o6 F7 ?. ]7 \! i) z/ rwindows 系统下( A* I/ ?0 j3 u3 @
C:\Windows\Fonts
+ A% h. w3 j/ b6 C$ z2 f8 z, a# x7 Llinux 系统下

7 e/ U4 I8 K5 y$ W配置后出现如下问题
/ T% \+ H1 w* i: Y- _( R2 `  }. tsudo gedit /etc/profile
4 m& Y& ~9 Q% O[sudo] password for hw:
4 O5 ?1 x# r" L$ S; D7 T* n& W9 H: v6 v
(gedit:5480): IBUS-WARNING **: The owner of /home/hw/.config/ibus/bus is not root!- `( d% h( ?: l2 C. K
6 a3 X4 e) u- v0 l
(gedit:5480): Gtk-WARNING **: Calling Inhibit failed: GDBus.Errorrg.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files. l1 P8 q1 V9 B/ g

) t; P, O( _) ^9 @5 U( L(gedit:5480): Gtk-WARNING **: Calling Inhibit failed: GDBus.Errorrg.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
作者: tenny    时间: 2015-6-25 10:32
你在 pc 上的 linux 上做配置?你不是开发板上的 QT 不能显示中文?
作者: 小鱼儿    时间: 2015-6-25 14:35
tenny 发表于 2015-6-25 10:32
+ c, J! a7 G8 B8 z# n; U你在 pc 上的 linux 上做配置?你不是开发板上的 QT 不能显示中文?
8 ?' Y: O+ H) ?. Z  `
我是说PC上的linux上的qt不能显示中文,我写了一个小程序,运行后中文无法显示




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4