1 QString file_full, file_name, file_path,file_suffix ;
2 QFileInfo fileinfo;
3 file_full = QFileDialog::getOpenFileName(this,.....);
4 fileinfo = QFileInfo(file_full);
5 //文件名
6 file_name = fileinfo.fileName();
7 //文件后缀
8 file_suffix = fileinfo.suffix()
9 //绝对路径
10 file_path = fileinfo.absolutePath();