QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
QTextCodec::setCodecForTr(QTextCodec::codecForName("eucKR"));
If the literal quoted text in the program is not in the Latin-1 encoding, this function can be used to set the appropriate encoding.
QTextCodec::setCodecForTr(QTextCodec::codecForName("eucKR"));
If the literal quoted text in the program is not in the Latin-1 encoding, this function can be used to set the appropriate encoding.
#include <QtGui/QApplication>
#include "mainwindow.h"
#include<QTextCodec>//add
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForLocale());//add
MainWindow w;
w.show();
return a.exec();
}