#include<QApplication>
#include<QLabel>
#include <QTextCodec>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QTextCodec *cnCodec=QTextCodec::codecForName("GB2312");
QTextCodec::setCodecForTr(cnCodec);
QString text=cnCodec->toUnicode("你好!");
QLabel *label=new QLabel(text);
label->show();
return app.exec();
}
以上是一个很简单的用中文的例子。试试。。。。