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 .