在 QT::QDIR 中需要显示树形目录结构并过滤不应显示的特定文件夹

发布于 2024-12-01 00:32:06 字数 228 浏览 2 评论 0原文

使用QT::QDIR,我尝试在Treeview中显示目录集,就像当您选择文件夹图标时在Windows资源管理器中显示的那样。

我成功地在树视图中显示文件夹。但有些文件夹不需要显示或需要隐藏。

使用QDIR中的文件夹选项列表可以指定限制文件夹列表。

谢谢 马森

Using QT::QDIR, i m trying to display the set of directories in Treeview as it is displayed in Windows explorer when u select the folders icon.

I succeeded in displaying the folders in treeview. But there are certain folders need not to be displayed or needs to be hidden.

Using list of folders options in QDIR is there any way to specify the list of restriction folders.

Thanks
Mathan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

要走就滚别墨迹 2024-12-08 00:32:06

您可以使用以下方法: QDir::setNameFilters
Qt 文档中有一个示例

you can use the method : QDir::setNameFilters
ther is an example in the Qt documentation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文