头文件include<QTextCodec>
getMapFilePath = QFileDialog::getExistingDirectory(this,tr("文件对话框!"), "C:");
QTextCodec *code = QTextCodec::codecForName("GB2312");
std::string name = code->fromUnicode(getMapFilePath).data();
FILE *fpw=fopen(name.c_str(),"wb");
if(fpw==nullptr){
qDebug()<<"error rfopen"<<endl;
}