fix compile & runtime error

This commit is contained in:
王劲鹏 2021-05-14 21:05:56 +08:00 committed by osborn
parent 5eddcadf26
commit 3b8d76258d
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ HEADERS += \
demo/DoricDemoBridge.h
RESOURCES += qml.qrc
QTQUICK_COMPILER_SKIPPED_RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

View File

@ -14,7 +14,7 @@ public:
QFile *file = new QFile(resource.fileName());
file->open(QFile::ReadOnly | QFile::Text);
QTextStream in(file);
in.setAutoDetectUnicode(true);
in.setCodec("UTF-8");
QString content = in.readAll();
file->close();
delete file;