QFileInfo
QFileInfo 成员函数介绍
1.QString QFileInfo::fileName() const
Returns the name of the file, excluding the path.
1 | QFileInfo fi("/tmp/archive.tar.gz"); |
Note that, if this QFileInfo object is given a path ending in a slash, the name of the file is considered empty.
2.QString QFileInfo::completeBaseName() const
Returns the complete base name of the file without the path.
The complete base name consists of all characters in the file up to (but not including) the last ‘.’ character.
1 | QFileInfo fi("/tmp/archive.tar.gz"); |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Vinda's Blog!
评论