MCPcopy Index your code
hub / github.com/PyQt5/PyQt / getInfoIcon

Method getInfoIcon

QFileSystemModel/CustomIcon.py:58–63  ·  view source on GitHub ↗
(self, type_info)

Source from the content-addressed store, hash-verified

56 return super(FileIconProvider, self).icon(type_info)
57
58 def getInfoIcon(self, type_info):
59 if type_info.isDir(): # 文件夹
60 return self.DirIcon
61 if type_info.isFile() and type_info.suffix() == "txt": # 文件并且是txt
62 return self.TxtIcon
63 return super(FileIconProvider, self).icon(type_info)
64
65
66if __name__ == "__main__":

Callers 1

iconMethod · 0.95

Calls 1

iconMethod · 0.45

Tested by

no test coverage detected