我正在做一个项目,我需要在树状视图中显示一些文件夹。我有完整的文件路径列表,如:
- C: \文件夹1\文件1
- C: \文件夹1\文件夹11\文件2
- C: \文件夹2\文件3
等等
文件路径实际上存储在一个sql服务器中,我通过运行一个查询来获得它。在
我在找一种方法把它放进一个QTreeView中。在
我尝试过使用QFileSystemModel和setNameFilters,但这不起作用,因为您不能在过滤器中输入路径。在
有人建议使用QSortFilterProxyModel,但我不知道该怎么做。在
谢谢。在
汤姆。在
Tags:
请看下面的一个例子是否对你有用:
希望这对你有帮助,谢谢
相关问题 更多 >
编程相关推荐