#include <QtCore/QCoreApplication>
#include <QTextCodec>
#include "MyDialog .h"
#include <QLibrary>
#include <QDebug>
int main(int argc, char *argv[])
{
#ifdef WIN32
QTextCodec *codec=QTextCodec::codecForName("system");
#else
QTextCodec *codec=QTextCodec::codecForName("GB2312");
#endif
QTextCodec::setCodecForLocale(QTextCodec::codecForName("System"));
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
QCoreApplication a(argc, argv);
a.setOrganizationName("haha");
a.setApplicationName("MyDialog ");
MyDialog w;
return a.exec();
}
QT4.8.7万能的字体转码
最新推荐文章于 2024-11-02 14:41:43 发布