Qt QString类型 转换为 const char*
std::string str = file_path.toStdString();
const char *pPath2 = str.c_str();
获取文件夹路径
file_path = QFileDialog::getExistingDirectory(this,"Choose file path...","./");
获取文件路径
QString file_name=QFileDialog::getOpenFileName( 0, "OpenFile","","*.xml", 0 );
QString中内容替换
QString file_path;
file_path.replace("/","\\");//替换成左双斜杠