1 #include "mainwindow.h"
2 #include <QApplication>
3 #include <QTextCodec>
4
5 int main(int argc, char *argv[])
6 {
7 QApplication app(argc, argv);
8 QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); //设置为utf8
9 MainWindow w;
10 w.show();
11
12 return app.exec();
13 }
~
设置Qt编码为utf-8
最新推荐文章于 2024-07-30 15:36:19 发布