Ⅰ Linux下Qt编程怎么显示中文
来源C/C++ code#include <QtGui/QApplication>
#include <QtCore/QTextCodec>
#include <QDir>
#include <QTranslator>
#include "MainForm.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QDir::setCurrent(QApplication::applicationDirPath());
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GB18030"));
setupTranslator();
a.setApplicationName("中文程序");
TMainForm w;
w.show();
return a.exec();