Set TextCodec to UTF8

For now QTextEdit seems handle the Chinese correctly.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
Le Tan 2016-10-10 17:04:27 +08:00
parent 321289c8e0
commit e1c2204733

View File

@ -1,10 +1,15 @@
#include "vmainwindow.h"
#include <QApplication>
#include <QTextCodec>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTextCodec *codec = QTextCodec::codecForName("UTF8");
if (codec) {
QTextCodec::setCodecForLocale(codec);
}
VMainWindow w;
w.show();