中文路径
QT中应改为:
#include <QTextCodec>
QString strpath = "E:/QQ浏览器下载";
QTextCodec *code = QTextCodec::codecForName("GB2312");
std::string name = code->fromUnicode(strpath).data();
读取文件
C++中:
ifstream infile(dir, ifstream::_Nocreate);
QT中应改为:
ifstream infile(dir, ifstream::in);