Skip to content

Commit

Permalink
给托盘图标添加了悬停提示
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Sep 14, 2023
1 parent 6ca051f commit d3422cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
from PyQt5.QtCore import Qt, pyqtSignal, QSize
from PyQt5.QtGui import QIcon, QImage, QCursor
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon
from qfluentwidgets import (NavigationItemPosition, InfoBar, InfoBarPosition,
FluentWindow, SplashScreen, MessageBox, SmoothScrollArea, Action)
from qfluentwidgets import (NavigationItemPosition, InfoBar, InfoBarPosition, Action,
FluentWindow, SplashScreen, MessageBox, SmoothScrollArea,
ToolTipFilter)
from qfluentwidgets import FluentIcon as FIF
import pyperclip

Expand Down Expand Up @@ -188,6 +189,9 @@ def __initWindow(self):

def __initSystemTray(self):
self.trayIcon = QSystemTrayIcon(self)
self.trayIcon.setToolTip("Seraphine")
self.trayIcon.installEventFilter(ToolTipFilter(self.trayIcon))

self.trayIcon.setIcon(QIcon("app/resource/images/logo.png"))

careerAction = Action(Icon.PERSON, self.tr("Career"), self)
Expand Down

0 comments on commit d3422cf

Please sign in to comment.