HOW TO 统一设置字体中文宋体,英文数据Arial字体?!
wyjam 2011-01-25 11:09:57 如题,怎么样给一串字符,如: “2011年01月25日,星期二,下午2点30分”中的中文字体设置宋体,英文与数字使用Arial字体,要统一设置!只要出现英文就用Arial,只要出现中文就用宋体. 还有是否使用粗体、字体大小。
而不是SetText();类似如下的内容:(QLabel *label = new QLabel(this);, lable->setText(strText));
<body style=" font-family:'宋体'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12px;">我是中国人</span><span style=" font-size:12px; font-family:'Arial';">I'm chinese.</span><span style="fong-family:'宋体'; font-size:12px;">我是中国人</span></p></body>