qfluentwidgets使用SegoeFont
qfluentwidgets
qfluentwidgets是Qt的一个组件库,具体到官网https://qfluentwidgets.com/zh/
SegoeFont
SegoeFont是Windows11推出的图标库
路径:C:\Windows\Fonts
官网:https://learn.microsoft.com/zh-cn/windows/apps/design/style/segoe-fluent-icons-font

使用
在qfluentwidgets中使用SegoeFont图标
SegoeIcons.json
json
{
"GlobalNavButton": "\ue700",
"Wifi": "\ue701",
"Bluetooth": "\ue702",
"Connect": "\ue703",
"InternetSharing": "\ue704",
"VPN": "\ue705",
"Brightness": "\ue706",
"MapPin": "\ue707",
"QuietHours": "\ue708",
"Airplane": "\ue709",
"Tablet": "\ue70a",
"QuickNote": "\ue70b",
"RememberedDevice": "\ue70c",
"ChevronDown": "\ue70d",
"ChevronUp": "\ue70e",
"Edit": "\ue70f",
"Add": "\ue710",
"Cancel": "\ue711",
"More": "\ue712",
"Settings": "\ue713",
"Video": "\ue714",
"Mail": "\ue715",
"People": "\ue716",
"Phone": "\ue717",
"Pin": "\ue718",
"Shop": "\ue719",
"Stop": "\ue71a",
"Link": "\ue71b",
"Filter": "\ue71c",
"AllApps": "\ue71d",
"Zoom": "\ue71e",
"ZoomOut": "\ue71f",
"Microphone": "\ue720",
"Search": "\ue721",
"Camera": "\ue722",
"Attach": "\ue723",
"Send": "\ue724",
"SendFill": "\ue725",
"WalkSolid": "\ue726",
"InPrivate": "\ue727",
"FavoriteList": "\ue728",
"PageSolid": "\ue729",
"Forward": "\ue72a",
"Back": "\ue72b",
"Refresh": "\ue72c",
"Share": "\ue72d",
"Lock": "\ue72e",
"BlockedSite": "\ue72f",
"ReportHacked": "\ue730",
"EMI": "\ue731",
"Blocked": "\ue733",
"FavoriteStar": "\ue734",
"FavoriteStarFill": "\ue735",
"ReadingMode": "\ue736",
"Favicon": "\ue737",
"Remove": "\ue738",
"Checkbox": "\ue739",
"CheckboxComposite": "\ue73a",
"CheckboxFill": "\ue73b",
"CheckboxIndeterminate": "\ue73c",
"CheckboxCompositeReversed": "\ue73d",
"CheckMark": "\ue73e",
"BackToWindow": "\ue73f",
"FullScreen": "\ue740",
"ResizeTouchLarger": "\ue741",
"ResizeTouchSmaller": "\ue742",
"ResizeMouseSmall": "\ue743",
"ResizeMouseMedium": "\ue744",
"ResizeMouseWide": "\ue745",
"ResizeMouseTall": "\ue746",
"ResizeMouseLarge": "\ue747",
"SwitchUser": "\ue748",
"Print": "\ue749",
"Up": "\ue74a",
"Down": "\ue74b",
"OEM": "\ue74c",
"Delete": "\ue74d",
"Save": "\ue74e",
"Mute": "\ue74f",
"BackSpaceQWERTY": "\ue750",
"ReturnKey": "\ue751",
"UpArrowShiftKey": "\ue752",
"Cloud": "\ue753",
"Flashlight": "\ue754",
"RotationLock": "\ue755",
"CommandPrompt": "\ue756",
"SIPMove": "\ue759",
"SIPUndock": "\ue75a",
"SIPRedock": "\ue75b",
"EraseTool": "\ue75c",
"UnderscoreSpace": "\ue75d",
"GripperTool": "\ue75e",
"Dialpad": "\ue75f",
"PageLeft": "\ue760",
"PageRight": "\ue761",
"MultiSelect": "\ue762",
"KeyboardLeftHanded": "\ue763",
"KeyboardRightHanded": "\ue764",
"KeyboardClassic": "\ue765",
"KeyboardSplit": "\ue766",
"Volume": "\ue767",
"Play": "\ue768",
"Pause": "\ue769",
"ChevronLeft": "\ue76b",
"ChevronRight": "\ue76c",
"InkingTool": "\ue76d",
"Emoji2": "\ue76e",
"GripperBarHorizontal": "\ue76f",
"System": "\ue770",
"Personalize": "\ue771",
"Devices": "\ue772",
"SearchAndApps": "\ue773",
"Globe": "\ue774",
"TimeLanguage": "\ue775",
"EaseOfAccess": "\ue776",
"UpdateRestore": "\ue777",
"HangUp": "\ue778",
"ContactInfo": "\ue779",
"Unpin": "\ue77a",
"Contact": "\ue77b",
"Memo": "\ue77c",
"IncomingCall": "\ue77e",
"Paste": "\ue77f",
"PhoneBook": "\ue780",
"LEDLight": "\ue781",
"Error": "\ue783",
"GripperBarVertical": "\ue784",
"Unlock": "\ue785",
"Slideshow": "\ue786",
"Calendar": "\ue787",
"GripperResize": "\ue788",
"Megaphone": "\ue789",
"Trim": "\ue78a",
"NewWindow": "\ue78b",
"SaveLocal": "\ue78c",
"Color": "\ue790",
"DataSense": "\ue791",
"SaveAs": "\ue792",
"Light": "\ue793",
"Effects": "\ue794",
"AspectRatio": "\ue799",
"Contrast": "\ue7a1",
"DataSenseBar": "\ue7a5",
"Redo": "\ue7a6",
"Undo": "\ue7a7",
"Crop": "\ue7a8",
"PhotoCollection": "\ue7aa",
"OpenWith": "\ue7ac",
"Rotate": "\ue7ad",
"RedEye": "\ue7b3",
"SetlockScreen": "\ue7b5",
"MapPin2": "\ue7b7",
"Package": "\ue7b8",
"Warning": "\ue7ba",
"ReadingList": "\ue7bc",
"Education": "\ue7be",
"ShoppingCart": "\ue7bf",
"Train": "\ue7c0",
"Flag": "\ue7c1",
"Move": "\ue7c2",
"Page": "\ue7c3",
"TaskView": "\ue7c4",
"BrowsePhotos": "\ue7c5",
"HalfStarLeft": "\ue7c6",
"HalfStarRight": "\ue7c7",
"Record": "\ue7c8",
"TouchPointer": "\ue7c9",
"LangJPN": "\ue7de",
"Ferry": "\ue7e3",
"Highlight": "\ue7e6",
"ActionCenterNotification": "\ue7e7",
"PowerButton": "\ue7e8",
"ResizeTouchNarrower": "\ue7ea",
"ResizeTouchShorter": "\ue7eb",
"DrivingMode": "\ue7ec",
"RingerSilent": "\ue7ed",
"OtherUser": "\ue7ee",
"Admin": "\ue7ef",
"CC": "\ue7f0",
"SDCard": "\ue7f1",
"CallForwarding": "\ue7f2",
"SettingsDisplaySound": "\ue7f3",
"TVMonitor": "\ue7f4",
"Speakers": "\ue7f5",
"Headphone": "\ue7f6",
"DeviceLaptopPic": "\ue7f7",
"DeviceLaptopNoPic": "\ue7f8",
"DeviceMonitorRightPic": "\ue7f9",
"DeviceMonitorLeftPic": "\ue7fa",
"DeviceMonitorNoPic": "\ue7fb",
"Game": "\ue7fc",
"HorizontalTabKey": "\ue7fd",
"StreetsideSplitMinimize": "\ue802",
"StreetsideSplitExpand": "\ue803",
"Car": "\ue804",
"Walk": "\ue805",
"Bus": "\ue806",
"TiltUp": "\ue809",
"TiltDown": "\ue80a",
"CallControl": "\ue80b",
"RotateMapRight": "\ue80c",
"RotateMapLeft": "\ue80d",
"Home": "\ue80f",
"ParkingLocation": "\ue811",
"MapCompassTop": "\ue812",
"MapCompassBottom": "\ue813",
"IncidentTriangle": "\ue814",
"Touch": "\ue815",
"MapDirections": "\ue816",
"StartPoint": "\ue819",
"StopPoint": "\ue81a",
"EndPoint": "\ue81b",
"History": "\ue81c",
"Location": "\ue81d",
"MapLayers": "\ue81e",
"Accident": "\ue81f",
"Work": "\ue821",
"Construction": "\ue822",
"Recent": "\ue823",
"Bank": "\ue825",
"DownloadMap": "\ue826",
"InkingToolFill2": "\ue829",
"HighlightFill2": "\ue82a",
"EraseToolFill": "\ue82b",
"EraseToolFill2": "\ue82c",
"Dictionary": "\ue82d",
"DictionaryAdd": "\ue82e",
"ToolTip": "\ue82f",
"ChromeBack": "\ue830",
"ProvisioningPackage": "\ue835",
"AddRemoteDevice": "\ue836",
"FolderOpen": "\ue838",
"Ethernet": "\ue839",
"ShareBroadband": "\ue83a",
"DirectAccess": "\ue83b",
"DialUp": "\ue83c",
"DefenderApp": "\ue83d",
"BatteryCharging9": "\ue83e",
"Battery10": "\ue83f",
"Pinned": "\ue840",
"PinFill": "\ue841",
"PinnedFill": "\ue842",
"PeriodKey": "\ue843",
"PuncKey": "\ue844",
"RevToggleKey": "\ue845",
"RightArrowKeyTime1": "\ue846",
"RightArrowKeyTime2": "\ue847",
"LeftQuote": "\ue848",
"RightQuote": "\ue849",
"DownShiftKey": "\ue84a",
"UpShiftKey": "\ue84b",
"PuncKey0": "\ue84c",
"PuncKeyLeftBottom": "\ue84d",
"RightArrowKeyTime3": "\ue84e",
"RightArrowKeyTime4": "\ue84f",
"Battery0": "\ue850",
"Battery1": "\ue851",
"Battery2": "\ue852",
"Battery3": "\ue853",
"Battery4": "\ue854",
"Battery5": "\ue855",
"Battery6": "\ue856",
"Battery7": "\ue857",
"Battery8": "\ue858",
"Battery9": "\ue859",
"BatteryCharging0": "\ue85a",
"BatteryCharging1": "\ue85b",
"BatteryCharging2": "\ue85c",
"BatteryCharging3": "\ue85d",
"BatteryCharging4": "\ue85e",
"BatteryCharging5": "\ue85f",
"BatteryCharging6": "\ue860",
"BatteryCharging7": "\ue861",
"BatteryCharging8": "\ue862",
"BatterySaver0": "\ue863",
"BatterySaver1": "\ue864",
"BatterySaver2": "\ue865",
"BatterySaver3": "\ue866",
"BatterySaver4": "\ue867",
"BatterySaver5": "\ue868",
"BatterySaver6": "\ue869",
"BatterySaver7": "\ue86a",
"BatterySaver8": "\ue86b",
"SignalBars1": "\ue86c",
"SignalBars2": "\ue86d",
"SignalBars3": "\ue86e",
"SignalBars4": "\ue86f",
"SignalBars5": "\ue870",
"SignalNotConnected": "\ue871",
"Wifi1": "\ue872",
"Wifi2": "\ue873",
"Wifi3": "\ue874",
"MobSIMLock": "\ue875",
"MobSIMMissing": "\ue876",
"Vibrate": "\ue877",
"RoamingInternational": "\ue878",
"RoamingDomestic": "\ue879",
"CallForwardInternational": "\ue87a",
"CallForwardRoaming": "\ue87b",
"JpnRomanji": "\ue87c",
"JpnRomanjiLock": "\ue87d",
"JpnRomanjiShift": "\ue87e",
"JpnRomanjiShiftLock": "\ue87f",
"StatusDataTransfer": "\ue880",
"StatusDataTransferVPN": "\ue881",
"StatusDualSIM2": "\ue882",
"StatusDualSIM2VPN": "\ue883",
"StatusDualSIM1": "\ue884",
"StatusDualSIM1VPN": "\ue885",
"StatusSGLTE": "\ue886",
"StatusSGLTECell": "\ue887",
"StatusSGLTEDataVPN": "\ue888",
"StatusVPN": "\ue889",
"WifiHotspot": "\ue88a",
"LanguageKor": "\ue88b",
"LanguageCht": "\ue88c",
"LanguageChs": "\ue88d",
"USB": "\ue88e",
"InkingToolFill": "\ue88f",
"View": "\ue890",
"HighlightFill": "\ue891",
"Previous": "\ue892",
"Next": "\ue893",
"Clear": "\ue894",
"Sync": "\ue895",
"Download": "\ue896",
"Help": "\ue897",
"Upload": "\ue898",
"Emoji": "\ue899",
"TwoPage": "\ue89a",
"LeaveChat": "\ue89b",
"MailForward": "\ue89c",
"RotateCamera": "\ue89e",
"ClosePane": "\ue89f",
"OpenPane": "\ue8a0",
"PreviewLink": "\ue8a1",
"AttachCamera": "\ue8a2",
"ZoomIn": "\ue8a3",
"Bookmarks": "\ue8a4",
"Document": "\ue8a5",
"ProtectedDocument": "\ue8a6",
"OpenInNewWindow": "\ue8a7",
"MailFill": "\ue8a8",
"ViewAll": "\ue8a9",
"VideoChat": "\ue8aa",
"Switch": "\ue8ab",
"Rename": "\ue8ac",
"Go": "\ue8ad",
"SurfaceHub": "\ue8ae",
"Remote": "\ue8af",
"Click": "\ue8b0",
"Shuffle": "\ue8b1",
"Movies": "\ue8b2",
"SelectAll": "\ue8b3",
"Orientation": "\ue8b4",
"Import": "\ue8b5",
"ImportAll": "\ue8b6",
"Folder": "\ue8b7",
"Webcam": "\ue8b8",
"Picture": "\ue8b9",
"Caption": "\ue8ba",
"ChromeClose": "\ue8bb",
"ShowResults": "\ue8bc",
"Message": "\ue8bd",
"Leaf": "\ue8be",
"CalendarDay": "\ue8bf",
"CalendarWeek": "\ue8c0",
"Characters": "\ue8c1",
"MailReplyAll": "\ue8c2",
"Read": "\ue8c3",
"ShowBcc": "\ue8c4",
"HideBcc": "\ue8c5",
"Cut": "\ue8c6",
"PaymentCard": "\ue8c7",
"Copy": "\ue8c8",
"Important": "\ue8c9",
"MailReply": "\ue8ca",
"Sort": "\ue8cb",
"MobileTablet": "\ue8cc",
"DisconnectDrive": "\ue8cd",
"MapDrive": "\ue8ce",
"ContactPresence": "\ue8cf",
"Priority": "\ue8d0",
"GotoToday": "\ue8d1",
"Font": "\ue8d2",
"FontColor": "\ue8d3",
"Contact2": "\ue8d4",
"FolderFill": "\ue8d5",
"Audio": "\ue8d6",
"Permissions": "\ue8d7",
"DisableUpdates": "\ue8d8",
"Unfavorite": "\ue8d9",
"OpenLocal": "\ue8da",
"Italic": "\ue8db",
"Underline": "\ue8dc",
"Bold": "\ue8dd",
"MoveToFolder": "\ue8de",
"LikeDislike": "\ue8df",
"Dislike": "\ue8e0",
"Like": "\ue8e1",
"AlignRight": "\ue8e2",
"AlignCenter": "\ue8e3",
"AlignLeft": "\ue8e4",
"OpenFile": "\ue8e5",
"ClearSelection": "\ue8e6",
"FontDecrease": "\ue8e7",
"FontIncrease": "\ue8e8",
"FontSize": "\ue8e9",
"CellPhone": "\ue8ea",
"Reshare": "\ue8eb",
"Tag": "\ue8ec",
"RepeatOne": "\ue8ed",
"RepeatAll": "\ue8ee",
"Calculator": "\ue8ef",
"Directions": "\ue8f0",
"Library": "\ue8f1",
"ChatBubbles": "\ue8f2",
"PostUpdate": "\ue8f3",
"NewFolder": "\ue8f4",
"CalendarReply": "\ue8f5",
"UnsyncFolder": "\ue8f6",
"SyncFolder": "\ue8f7",
"BlockContact": "\ue8f8",
"SwitchApps": "\ue8f9",
"AddFriend": "\ue8fa",
"Accept": "\ue8fb",
"GoToStart": "\ue8fc",
"BulletedList": "\ue8fd",
"Scan": "\ue8fe",
"Preview": "\ue8ff",
"Group": "\ue902",
"ZeroBars": "\ue904",
"OneBar": "\ue905",
"TwoBars": "\ue906",
"ThreeBars": "\ue907",
"FourBars": "\ue908",
"World": "\ue909",
"Comment": "\ue90a",
"MusicInfo": "\ue90b",
"DockLeft": "\ue90c",
"DockRight": "\ue90d",
"DockBottom": "\ue90e",
"Repair": "\ue90f",
"Accounts": "\ue910",
"DullSound": "\ue911",
"Manage": "\ue912",
"Street": "\ue913",
"Printer3D": "\ue914",
"RadioBullet": "\ue915",
"Stopwatch": "\ue916",
"Photo": "\ue91b",
"ActionCenter": "\ue91c",
"FullCircleMask": "\ue91f",
"ChromeMinimize": "\ue921",
"ChromeMaximize": "\ue922",
"ChromeRestore": "\ue923",
"Annotation": "\ue924",
"BackSpaceQWERTYSm": "\ue925",
"BackSpaceQWERTYMd": "\ue926",
"Swipe": "\ue927",
"Fingerprint": "\ue928",
"Handwriting": "\ue929",
"ChromeBackToWindow": "\ue92c",
"ChromeFullScreen": "\ue92d",
"KeyboardStandard": "\ue92e",
"KeyboardDismiss": "\ue92f",
"Completed": "\ue930",
"ChromeAnnotate": "\ue931",
"Label": "\ue932",
"IBeam": "\ue933",
"IBeamOutline": "\ue934",
"FlickDown": "\ue935",
"FlickUp": "\ue936",
"FlickLeft": "\ue937",
"FlickRight": "\ue938",
"FeedbackApp": "\ue939",
"MusicAlbum": "\ue93c",
"Streaming": "\ue93e",
"Code": "\ue943",
"ReturnToWindow": "\ue944",
"LightningBolt": "\ue945",
"Info": "\ue946",
"CalculatorMultiply": "\ue947",
"CalculatorAddition": "\ue948",
"CalculatorSubtract": "\ue949",
"CalculatorDivide": "\ue94a",
"CalculatorSquareroot": "\ue94b",
"CalculatorPercentage": "\ue94c",
"CalculatorNegate": "\ue94d",
"CalculatorEqualTo": "\ue94e",
"CalculatorBackspace": "\ue94f",
"Component": "\ue950",
"DMC": "\ue951",
"Dock": "\ue952",
"MultimediaDMS": "\ue953",
"MultimediaDVR": "\ue954",
"MultimediaPMP": "\ue955",
"PrintfaxPrinterFile": "\ue956",
"Sensor": "\ue957",
"StorageOptical": "\ue958",
"Communications": "\ue95a",
"Headset": "\ue95b",
"Projector": "\ue95d",
"Health": "\ue95e",
"Wire": "\ue95f",
"Webcam2": "\ue960",
"Input": "\ue961",
"Mouse": "\ue962",
"Smartcard": "\ue963",
"SmartcardVirtual": "\ue964",
"MediaStorageTower": "\ue965",
"ReturnKeySm": "\ue966",
"GameConsole": "\ue967",
"Network": "\ue968",
"StorageNetworkWireless": "\ue969",
"StorageTape": "\ue96a",
"ChevronUpSmall": "\ue96d",
"ChevronDownSmall": "\ue96e",
"ChevronLeftSmall": "\ue96f",
"ChevronRightSmall": "\ue970",
"ChevronUpMed": "\ue971",
"ChevronDownMed": "\ue972",
"ChevronLeftMed": "\ue973",
"ChevronRightMed": "\ue974",
"Devices2": "\ue975",
"ExpandTile": "\ue976",
"PC1": "\ue977",
"PresenceChicklet": "\ue978",
"PresenceChickletVideo": "\ue979",
"Reply": "\ue97a",
"SetTile": "\ue97b",
"Type": "\ue97c",
"Korean": "\ue97d",
"HalfAlpha": "\ue97e",
"FullAlpha": "\ue97f",
"Key12On": "\ue980",
"ChineseChangjie": "\ue981",
"QWERTYOn": "\ue982",
"QWERTYOff": "\ue983",
"ChineseQuick": "\ue984",
"Japanese": "\ue985",
"FullHiragana": "\ue986",
"FullKatakana": "\ue987",
"HalfKatakana": "\ue988",
"ChineseBoPoMoFo": "\ue989",
"ChinesePinyin": "\ue98a",
"ConstructionCone": "\ue98f",
"XboxOneConsole": "\ue990",
"Volume0": "\ue992",
"Volume1": "\ue993",
"Volume2": "\ue994",
"Volume3": "\ue995",
"BatteryUnknown": "\ue996",
"WifiAttentionOverlay": "\ue998",
"Robot": "\ue99a",
"TapAndSend": "\ue9a1",
"TextBulletListSquare": "\ue9a4",
"FitPage": "\ue9a6",
"PasswordKeyShow": "\ue9a8",
"PasswordKeyHide": "\ue9a9",
"BidiLtr": "\ue9aa",
"BidiRtl": "\ue9ab",
"ForwardSm": "\ue9ac",
"CommaKey": "\ue9ad",
"DashKey": "\ue9ae",
"DullSoundKey": "\ue9af",
"HalfDullSound": "\ue9b0",
"RightDoubleQuote": "\ue9b1",
"LeftDoubleQuote": "\ue9b2",
"PuncKeyRightBottom": "\ue9b3",
"PuncKey1": "\ue9b4",
"PuncKey2": "\ue9b5",
"PuncKey3": "\ue9b6",
"PuncKey4": "\ue9b7",
"PuncKey5": "\ue9b8",
"PuncKey6": "\ue9b9",
"PuncKey9": "\ue9ba",
"PuncKey7": "\ue9bb",
"PuncKey8": "\ue9bc",
"Frigid": "\ue9ca",
"Unknown": "\ue9ce",
"AreaChart": "\ue9d2",
"CheckList": "\ue9d5",
"Diagnostic": "\ue9d9",
"Equalizer": "\ue9e9",
"Process": "\ue9f3",
"Processing": "\ue9f5",
"ReportDocument": "\ue9f9"
}
icon.py
SegoeFontIconName类中的乱码是SegoeIcons.json的value的值,csdn没有这个字体无法显示,直接复制就好
python
# coding: utf-8
from enum import Enum
from typing import Union
from qfluentwidgets import FluentIconBase, Theme, getIconColor, FluentFontIconBase
class SegoeFontIconName(Enum):
GlobalNavButton = ''
Wifi = ''
Bluetooth = ''
Connect = ''
InternetSharing = ''
VPN = ''
Brightness = ''
MapPin = ''
QuietHours = ''
Airplane = ''
Tablet = ''
QuickNote = ''
RememberedDevice = ''
ChevronDown = ''
ChevronUp = ''
Edit = ''
Add = ''
Cancel = ''
More = ''
Settings = ''
Video = ''
Mail = ''
People = ''
Phone = ''
Pin = ''
Shop = ''
Stop = ''
Link = ''
Filter = ''
AllApps = ''
Zoom = ''
ZoomOut = ''
Microphone = ''
Search = ''
Camera = ''
Attach = ''
Send = ''
SendFill = ''
WalkSolid = ''
InPrivate = ''
FavoriteList = ''
PageSolid = ''
Forward = ''
Back = ''
Refresh = ''
Share = ''
Lock = ''
BlockedSite = ''
ReportHacked = ''
EMI = ''
Blocked = ''
FavoriteStar = ''
FavoriteStarFill = ''
ReadingMode = ''
Favicon = ''
Remove = ''
Checkbox = ''
CheckboxComposite = ''
CheckboxFill = ''
CheckboxIndeterminate = ''
CheckboxCompositeReversed = ''
CheckMark = ''
BackToWindow = ''
FullScreen = ''
ResizeTouchLarger = ''
ResizeTouchSmaller = ''
ResizeMouseSmall = ''
ResizeMouseMedium = ''
ResizeMouseWide = ''
ResizeMouseTall = ''
ResizeMouseLarge = ''
SwitchUser = ''
Print = ''
Up = ''
Down = ''
OEM = ''
Delete = ''
Save = ''
Mute = ''
BackSpaceQWERTY = ''
ReturnKey = ''
UpArrowShiftKey = ''
Cloud = ''
Flashlight = ''
RotationLock = ''
CommandPrompt = ''
SIPMove = ''
SIPUndock = ''
SIPRedock = ''
EraseTool = ''
UnderscoreSpace = ''
GripperTool = ''
Dialpad = ''
PageLeft = ''
PageRight = ''
MultiSelect = ''
KeyboardLeftHanded = ''
KeyboardRightHanded = ''
KeyboardClassic = ''
KeyboardSplit = ''
Volume = ''
Play = ''
Pause = ''
ChevronLeft = ''
ChevronRight = ''
InkingTool = ''
Emoji2 = ''
GripperBarHorizontal = ''
System = ''
Personalize = ''
Devices = ''
SearchAndApps = ''
Globe = ''
TimeLanguage = ''
EaseOfAccess = ''
UpdateRestore = ''
HangUp = ''
ContactInfo = ''
Unpin = ''
Contact = ''
Memo = ''
IncomingCall = ''
Paste = ''
PhoneBook = ''
LEDLight = ''
Error = ''
GripperBarVertical = ''
Unlock = ''
Slideshow = ''
Calendar = ''
GripperResize = ''
Megaphone = ''
Trim = ''
NewWindow = ''
SaveLocal = ''
Color = ''
DataSense = ''
SaveAs = ''
Light = ''
Effects = ''
AspectRatio = ''
Contrast = ''
DataSenseBar = ''
Redo = ''
Undo = ''
Crop = ''
PhotoCollection = ''
OpenWith = ''
Rotate = ''
RedEye = ''
SetlockScreen = ''
MapPin2 = ''
Package = ''
Warning = ''
ReadingList = ''
Education = ''
ShoppingCart = ''
Train = ''
Flag = ''
Move = ''
Page = ''
TaskView = ''
BrowsePhotos = ''
HalfStarLeft = ''
HalfStarRight = ''
Record = ''
TouchPointer = ''
LangJPN = ''
Ferry = ''
Highlight = ''
ActionCenterNotification = ''
PowerButton = ''
ResizeTouchNarrower = ''
ResizeTouchShorter = ''
DrivingMode = ''
RingerSilent = ''
OtherUser = ''
Admin = ''
CC = ''
SDCard = ''
CallForwarding = ''
SettingsDisplaySound = ''
TVMonitor = ''
Speakers = ''
Headphone = ''
DeviceLaptopPic = ''
DeviceLaptopNoPic = ''
DeviceMonitorRightPic = ''
DeviceMonitorLeftPic = ''
DeviceMonitorNoPic = ''
Game = ''
HorizontalTabKey = ''
StreetsideSplitMinimize = ''
StreetsideSplitExpand = ''
Car = ''
Walk = ''
Bus = ''
TiltUp = ''
TiltDown = ''
CallControl = ''
RotateMapRight = ''
RotateMapLeft = ''
Home = ''
ParkingLocation = ''
MapCompassTop = ''
MapCompassBottom = ''
IncidentTriangle = ''
Touch = ''
MapDirections = ''
StartPoint = ''
StopPoint = ''
EndPoint = ''
History = ''
Location = ''
MapLayers = ''
Accident = ''
Work = ''
Construction = ''
Recent = ''
Bank = ''
DownloadMap = ''
InkingToolFill2 = ''
HighlightFill2 = ''
EraseToolFill = ''
EraseToolFill2 = ''
Dictionary = ''
DictionaryAdd = ''
ToolTip = ''
ChromeBack = ''
ProvisioningPackage = ''
AddRemoteDevice = ''
FolderOpen = ''
Ethernet = ''
ShareBroadband = ''
DirectAccess = ''
DialUp = ''
DefenderApp = ''
BatteryCharging9 = ''
Battery10 = ''
Pinned = ''
PinFill = ''
PinnedFill = ''
PeriodKey = ''
PuncKey = ''
RevToggleKey = ''
RightArrowKeyTime1 = ''
RightArrowKeyTime2 = ''
LeftQuote = ''
RightQuote = ''
DownShiftKey = ''
UpShiftKey = ''
PuncKey0 = ''
PuncKeyLeftBottom = ''
RightArrowKeyTime3 = ''
RightArrowKeyTime4 = ''
Battery0 = ''
Battery1 = ''
Battery2 = ''
Battery3 = ''
Battery4 = ''
Battery5 = ''
Battery6 = ''
Battery7 = ''
Battery8 = ''
Battery9 = ''
BatteryCharging0 = ''
BatteryCharging1 = ''
BatteryCharging2 = ''
BatteryCharging3 = ''
BatteryCharging4 = ''
BatteryCharging5 = ''
BatteryCharging6 = ''
BatteryCharging7 = ''
BatteryCharging8 = ''
BatterySaver0 = ''
BatterySaver1 = ''
BatterySaver2 = ''
BatterySaver3 = ''
BatterySaver4 = ''
BatterySaver5 = ''
BatterySaver6 = ''
BatterySaver7 = ''
BatterySaver8 = ''
SignalBars1 = ''
SignalBars2 = ''
SignalBars3 = ''
SignalBars4 = ''
SignalBars5 = ''
SignalNotConnected = ''
Wifi1 = ''
Wifi2 = ''
Wifi3 = ''
MobSIMLock = ''
MobSIMMissing = ''
Vibrate = ''
RoamingInternational = ''
RoamingDomestic = ''
CallForwardInternational = ''
CallForwardRoaming = ''
JpnRomanji = ''
JpnRomanjiLock = ''
JpnRomanjiShift = ''
JpnRomanjiShiftLock = ''
StatusDataTransfer = ''
StatusDataTransferVPN = ''
StatusDualSIM2 = ''
StatusDualSIM2VPN = ''
StatusDualSIM1 = ''
StatusDualSIM1VPN = ''
StatusSGLTE = ''
StatusSGLTECell = ''
StatusSGLTEDataVPN = ''
StatusVPN = ''
WifiHotspot = ''
LanguageKor = ''
LanguageCht = ''
LanguageChs = ''
USB = ''
InkingToolFill = ''
View = ''
HighlightFill = ''
Previous = ''
Next = ''
Clear = ''
Sync = ''
Download = ''
Help = ''
Upload = ''
Emoji = ''
TwoPage = ''
LeaveChat = ''
MailForward = ''
RotateCamera = ''
ClosePane = ''
OpenPane = ''
PreviewLink = ''
AttachCamera = ''
ZoomIn = ''
Bookmarks = ''
Document = ''
ProtectedDocument = ''
OpenInNewWindow = ''
MailFill = ''
ViewAll = ''
VideoChat = ''
Switch = ''
Rename = ''
Go = ''
SurfaceHub = ''
Remote = ''
Click = ''
Shuffle = ''
Movies = ''
SelectAll = ''
Orientation = ''
Import = ''
ImportAll = ''
Folder = ''
Webcam = ''
Picture = ''
Caption = ''
ChromeClose = ''
ShowResults = ''
Message = ''
Leaf = ''
CalendarDay = ''
CalendarWeek = ''
Characters = ''
MailReplyAll = ''
Read = ''
ShowBcc = ''
HideBcc = ''
Cut = ''
PaymentCard = ''
Copy = ''
Important = ''
MailReply = ''
Sort = ''
MobileTablet = ''
DisconnectDrive = ''
MapDrive = ''
ContactPresence = ''
Priority = ''
GotoToday = ''
Font = ''
FontColor = ''
Contact2 = ''
FolderFill = ''
Audio = ''
Permissions = ''
DisableUpdates = ''
Unfavorite = ''
OpenLocal = ''
Italic = ''
Underline = ''
Bold = ''
MoveToFolder = ''
LikeDislike = ''
Dislike = ''
Like = ''
AlignRight = ''
AlignCenter = ''
AlignLeft = ''
OpenFile = ''
ClearSelection = ''
FontDecrease = ''
FontIncrease = ''
FontSize = ''
CellPhone = ''
Reshare = ''
Tag = ''
RepeatOne = ''
RepeatAll = ''
Calculator = ''
Directions = ''
Library = ''
ChatBubbles = ''
PostUpdate = ''
NewFolder = ''
CalendarReply = ''
UnsyncFolder = ''
SyncFolder = ''
BlockContact = ''
SwitchApps = ''
AddFriend = ''
Accept = ''
GoToStart = ''
BulletedList = ''
Scan = ''
Preview = ''
Group = ''
ZeroBars = ''
OneBar = ''
TwoBars = ''
ThreeBars = ''
FourBars = ''
World = ''
Comment = ''
MusicInfo = ''
DockLeft = ''
DockRight = ''
DockBottom = ''
Repair = ''
Accounts = ''
DullSound = ''
Manage = ''
Street = ''
Printer3D = ''
RadioBullet = ''
Stopwatch = ''
Photo = ''
ActionCenter = ''
FullCircleMask = ''
ChromeMinimize = ''
ChromeMaximize = ''
ChromeRestore = ''
Annotation = ''
BackSpaceQWERTYSm = ''
BackSpaceQWERTYMd = ''
Swipe = ''
Fingerprint = ''
Handwriting = ''
ChromeBackToWindow = ''
ChromeFullScreen = ''
KeyboardStandard = ''
KeyboardDismiss = ''
Completed = ''
ChromeAnnotate = ''
Label = ''
IBeam = ''
IBeamOutline = ''
FlickDown = ''
FlickUp = ''
FlickLeft = ''
FlickRight = ''
FeedbackApp = ''
MusicAlbum = ''
Streaming = ''
Code = ''
ReturnToWindow = ''
LightningBolt = ''
Info = ''
CalculatorMultiply = ''
CalculatorAddition = ''
CalculatorSubtract = ''
CalculatorDivide = ''
CalculatorSquareroot = ''
CalculatorPercentage = ''
CalculatorNegate = ''
CalculatorEqualTo = ''
CalculatorBackspace = ''
Component = ''
DMC = ''
Dock = ''
MultimediaDMS = ''
MultimediaDVR = ''
MultimediaPMP = ''
PrintfaxPrinterFile = ''
Sensor = ''
StorageOptical = ''
Communications = ''
Headset = ''
Projector = ''
Health = ''
Wire = ''
Webcam2 = ''
Input = ''
Mouse = ''
Smartcard = ''
SmartcardVirtual = ''
MediaStorageTower = ''
ReturnKeySm = ''
GameConsole = ''
Network = ''
StorageNetworkWireless = ''
StorageTape = ''
ChevronUpSmall = ''
ChevronDownSmall = ''
ChevronLeftSmall = ''
ChevronRightSmall = ''
ChevronUpMed = ''
ChevronDownMed = ''
ChevronLeftMed = ''
ChevronRightMed = ''
Devices2 = ''
ExpandTile = ''
PC1 = ''
PresenceChicklet = ''
PresenceChickletVideo = ''
Reply = ''
SetTile = ''
Type = ''
Korean = ''
HalfAlpha = ''
FullAlpha = ''
Key12On = ''
ChineseChangjie = ''
QWERTYOn = ''
QWERTYOff = ''
ChineseQuick = ''
Japanese = ''
FullHiragana = ''
FullKatakana = ''
HalfKatakana = ''
ChineseBoPoMoFo = ''
ChinesePinyin = ''
ConstructionCone = ''
XboxOneConsole = ''
Volume0 = ''
Volume1 = ''
Volume2 = ''
Volume3 = ''
BatteryUnknown = ''
WifiAttentionOverlay = ''
Robot = ''
TapAndSend = ''
TextBulletListSquare = ''
FitPage = ''
PasswordKeyShow = ''
PasswordKeyHide = ''
BidiLtr = ''
BidiRtl = ''
ForwardSm = ''
CommaKey = ''
DashKey = ''
DullSoundKey = ''
HalfDullSound = ''
RightDoubleQuote = ''
LeftDoubleQuote = ''
PuncKeyRightBottom = ''
PuncKey1 = ''
PuncKey2 = ''
PuncKey3 = ''
PuncKey4 = ''
PuncKey5 = ''
PuncKey6 = ''
PuncKey9 = ''
PuncKey7 = ''
PuncKey8 = ''
Frigid = ''
Unknown = ''
AreaChart = ''
CheckList = ''
Diagnostic = ''
Equalizer = ''
Process = ''
Processing = ''
ReportDocument = ''
class SegoeIcons(FluentFontIconBase):
NAME = SegoeFontIconName
def __init__(self, char: Union[str, Enum]):
if isinstance(char, SegoeFontIconName):
char = char.value
super().__init__(char)
def path(self, theme=Theme.AUTO):
return "font/SegoeIcons.ttf"
def iconNameMapPath(self):
return "font/SegoeIcons.json"
@classmethod
def fromName(cls, name: Union[str, SegoeFontIconName]):
if isinstance(name, SegoeFontIconName):
name = name.name
return super().fromName(name)
Demo
python
# coding: utf-8
import sys
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout
from qfluentwidgets import SwitchButton, toggleTheme, FlowLayout, SmoothScrollArea, IconWidget, HorizontalSeparator
from app.common import SegoeFontIconName, SegoeIcons
class Demo(SmoothScrollArea):
def __init__(self):
super().__init__()
self.scrollWidget = QWidget()
self.themeButton = SwitchButton(self)
self.verticalLayout = QVBoxLayout(self.scrollWidget)
self.flowLayout = FlowLayout()
for item in SegoeFontIconName:
iconWidget = IconWidget(SegoeIcons.fromName(item), self.scrollWidget)
# iconWidget = IconWidget(SegoeIcons(item), self.scrollWidget)
iconWidget.setToolTip(item.name)
iconWidget.setFixedSize(32, 32)
self.flowLayout.addWidget(iconWidget)
self.verticalLayout.addWidget(self.themeButton)
self.verticalLayout.addWidget(HorizontalSeparator(self.scrollWidget))
self.verticalLayout.addLayout(self.flowLayout)
self.scrollWidget.setLayout(self.verticalLayout)
self.scrollWidget.setAutoFillBackground(False)
self.scrollWidget.setStyleSheet('QWidget { background: transparent }')
self.setWidget(self.scrollWidget)
self.setWidgetResizable(True)
self.resize(500, 500)
self.themeButton.setOnText("Dark")
self.themeButton.setOffText("Light")
self.themeButton.checkedChanged.connect(self.toggleTheme)
def toggleTheme(self, isCheked):
toggleTheme()
if not isCheked:
self.setStyleSheet("Demo{background:rgb(32,32,32)}")
else:
self.setStyleSheet("Demo{background:rgb(242,242,242)}")
if __name__ == '__main__':
app = QApplication(sys.argv)
w = Demo()
w.show()
app.exec()
