转到QT C 应用上Android/ios上下载的设备根路径
Go to device root path of Downloads on Android/iOS on Qt C++ app
希望一切都很好。我正在尝试在QT C 应用程序上访问Android和iOS上下载的设备根路径。到目前为止,我的代码:
mPath = "~/Downloads";
dirmodel = new QFileSystemModel (this);
dirmodel->setFilter(QDir::AllDirs | QDir::NoDotAndDotDot);
dirmodel->setRootPath(mPath);
预先感谢。
您需要使用qstandardpaths类。它为您提供QstandardPaths :: DownloadLocation。根据平台,它将自动转化为正确的位置。
相关文章:
- 如何将更多文件夹添加到c++include路径
- 带有特殊路径部分的"std::filesystem::weakly_canonical"失败
- C++A*算法并不总是在路径中具有目标节点
- 从函数角度看ID到文件路径的内部与外部映射
- 下载URL中的所有文件
- boost xml parsingl将xml的路径作为变量发送
- 对于MacOS上的G++,如何添加默认的include目录/usr/local/include和默认的库搜索路径/usr
- 如何使用cppcheck处理半相对包含路径
- 在C++中设置基于操作系统的文件路径
- 基于编译器选项的编译二进制路径
- 按边长度递归搜索图中所有可行路径
- 使用变量值作为 PlaySound 中的路径
- 如何转换真实路径 CString c++
- 从 GUID 获取 USB 卷路径
- 查找 GCD:并非所有控制路径都返回值
- C++17 文件系统::remove_all 带有通配符路径
- 在带有尾部斜杠的路径上返回 std::filesystem::create_directories() 的值
- 获取当前正在运行的 exe 名称(不是路径)
- 转到QT C 应用上Android/ios上下载的设备根路径
- 如何通过数据包解析在FTP上传/下载中获得源和目的地的完整路径