【问题标题】:.app files behaves like folder in Qtreeview on MAC.app 文件的行为类似于 MAC 上 Qtreeview 中的文件夹
【发布时间】:2013-11-25 10:38:25
【问题描述】:

我在 QTreeView 中使用 QSortFilterProxyModel 来探索 MAC 系统上目录的所有文件和文件夹。它工作正常。但我的问题是,在我的 Qtreeview 中,.app 文件的行为也像文件夹。意味着 .app 文件也有一个扩展箭头,就像文件夹一样。我想删除这个扩展箭头。 谢谢。

【问题讨论】:

  • .app "files" 在 Mac ARE 文件夹中。它们只是被 Finder 显示为一个不透明的应用程序(并且可以通过上下文菜单项“显示包内容”进行扩展)。
  • 我还想将它们显示为一个不透明的应用程序,就像 finder 一样。我应该在树视图中执行此操作。

标签: c++ qt qtreeview qfilesystemmodel qsortfilterproxymodel


【解决方案1】:

检测到属性列表文件,然后你就知道它是一个包,即MyApp.app/Contents/Info.plist

https://developer.apple.com/library/mac/documentation/corefoundation/conceptual/cfbundles/Introduction/Introduction.html

【讨论】:

    猜你喜欢
    • 2021-07-13
    • 2013-03-03
    • 2013-01-31
    • 2012-04-28
    • 1970-01-01
    • 2014-08-01
    • 1970-01-01
    • 2019-03-11
    • 1970-01-01
    相关资源
    最近更新 更多