initial fluent-widgets ui

This commit is contained in:
2025-08-14 18:45:16 +08:00
parent 746e83ab23
commit 4c66886257
1198 changed files with 805339 additions and 0 deletions

19
docs/source/icon.md Normal file
View File

@ -0,0 +1,19 @@
## Icon
Many widgets need icons, if you want PyQt-Fluent-Widgets change your icons automatically when the theme changes, then you can inherit `FluentIconBase` and overide `path()` method. Here is an example:
```python
from enum import Enum
from qfluentwidgets import getIconColor, Theme, FluentIconBase
class MyFluentIcon(FluentIconBase, Enum):
""" Custom icons """
ADD = "Add"
CUT = "Cut"
COPY = "Copy"
def path(self, theme=Theme.AUTO):
return f':/icons/{self.value}_{getIconColor(theme)}.svg'
```