QT中获取文件路径、文件名、后缀
作者:互联网
QString file_full, file_name, file_path,file_suffix ;
QFileInfo fileinfo;
file_full = QFileDialog::getOpenFileName(this,.....);
fileinfo = QFileInfo(file_full);
//文件名
file_name = fileinfo.fileName();
//文件后缀
file_suffix = fileinfo.suffix()
//绝对路径
file_path = fileinfo.absolutePath();
标签:full,QT,QFileInfo,文件名,后缀,file,path,fileinfo,suffix 来源: https://www.cnblogs.com/chinasoft/p/16103519.html