The QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel 类。 更多...
| 头: | #include <QFileIconProvider> | 
| qmake: | QT += widgets | 
| enum | IconType { Computer, Desktop, Trashcan, Network, ..., File } | 
| enum | Option { DontUseCustomDirectoryIcons } | 
| flags | Options | 
| QFileIconProvider () | |
| virtual | ~QFileIconProvider () | 
| virtual QIcon | icon (QFileIconProvider::IconType type ) const | 
| virtual QIcon | icon (const QFileInfo & info ) const | 
| QFileIconProvider::Options | options () const | 
| void | setOptions (QFileIconProvider::Options options ) | 
| virtual QString | type (const QFileInfo & info ) const | 
The QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel 类。
| 常量 | 值 | 
|---|---|
| 
QFileIconProvider::Computer
								 | 
0
								 | 
| 
QFileIconProvider::Desktop
								 | 
1
								 | 
| 
QFileIconProvider::Trashcan
								 | 
2
								 | 
| 
QFileIconProvider::Network
								 | 
3
								 | 
| 
QFileIconProvider::Drive
								 | 
4
								 | 
| 
QFileIconProvider::Folder
								 | 
5
								 | 
| 
QFileIconProvider::File
								 | 
6
								 | 
| 常量 | 值 | 描述 | 
|---|---|---|
| 
QFileIconProvider::DontUseCustomDirectoryIcons
								 | 
0x00000001
								 | Always use the default directory icon. Some platforms allow the user to set a different icon. Custom icon lookup cause a big performance impact over network or removable drives. | 
该枚举在 Qt 5.2 引入或被修改。
Options 类型是 typedef 对于 QFlags <Option>。它存储 Option 值的 OR 组合。
构造文件图标提供程序。
[虚拟]
						
						QFileIconProvider::
						
							~QFileIconProvider
						
						()
						
					销毁文件图标提供程序。
[虚拟]
						
						
							
								QIcon
							
						
						QFileIconProvider::
						
							icon
						
						(
						
							
								QFileIconProvider::IconType
							
						
						
							type
						
						) const
						
					Returns an icon set for the given type .
[虚拟]
						
						
							
								QIcon
							
						
						QFileIconProvider::
						
							icon
						
						(const
						
							
								QFileInfo
							
						
						&
						
							info
						
						) const
						
					Returns an icon for the file described by info .
Returns all the options that affect the icon provider. By default, all options are disabled.
该函数在 Qt 5.2 引入。
另请参阅 setOptions ().
集 options 影响图标提供程序。
该函数在 Qt 5.2 引入。
另请参阅 options ().
[虚拟]
						
						
							
								QString
							
						
						QFileIconProvider::
						
							type
						
						(const
						
							
								QFileInfo
							
						
						&
						
							info
						
						) const
						
					返回文件的类型,描述通过 info .