魅力博客

魅力Linux|魅力空间|魅力博客|学习Linux|ubuntu日记|电脑教程|手机软件

解决Qt4程序中文显示问题及chm文档中文乱码解决方法



解决Qt4程序中文显示

#include
#include
#include
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QPushButton hello(QString::fromLocal8Bit("这是"));
    hello.resize(100, 30);
    hello.show();
    return app.exec();
}
把汉字前面加上QString::fromLocal8Bit就可以显示汉字

chm中文乱码的问题 解决方法:

xchm是 Linux 下比较流行的 chm 文件阅读器,但是如果默认安装的话中文文件会变成乱码,
解决

使用chmsee 作为chm 的阅读器, 安装之后 xchm 和 chmsee 均可阅读中文文件

# sudo apt-get install chmsee

再打开文件看看已经变得正常了~~


返回顶部

上一篇:linux下移植mplayer到mini2440的全过程

下一篇:如何在开发板上增加中文环境支持方法

发表评论:

Powered By Z-BlogPHP 1.7.4



本网站内容均采用知识共享署名4.0国际许可协议

网站备案号粤ICP备15104741号-1