Qt类用于处理文件路径 [英] Qt class for handling file paths

查看:292
本文介绍了Qt类用于处理文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Qt相当于PathAppend?

路径在Qt?特别是我正在寻找像.NET的Path.Combine。

Is there a class that handles file paths in Qt? Particularly I'm looking for something like .NET's Path.Combine.

我知道有一个在boost :: filesystem,但我想知道是否有一个在Qt。 p>

I know there's one in boost::filesystem but I was wondering if there's one in Qt.

推荐答案

QDir < a>这可能是有帮助的(参见 QDir :: relativeFilePath QDir :: canonicalPath 和其他)。

从QDir文档引用:


QDir用于操纵路径
名称,访问关于
路径和文件的信息,并操作
底层文件系统。

A QDir is used to manipulate path names, access information regarding paths and files, and manipulate the underlying file system.

这篇关于Qt类用于处理文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆