在 Qt4 中单击后反转系统托盘图标中的颜色?
基本上,我想在单击时反转仅 systrayicon 的 osx 应用程序的颜色(与 Mac 应用程序上的正常情况一样),就像 Mac 应用程序上的默认行为一样。当 Mac 不支持 aboutToHide() 时,我现在该怎么做?
我可以以某种方式围绕它编写代码吗?使用qt 4.7.3
Basically I want to invert the colors of my systrayicon only osx app when it is clicked (as normal on Mac apps), as is default behavior on mac apps. How would I do this now when aboutToHide() isn’t supported on Mac?
Can I code around it somehow? Using qt 4.7.3
我不是为 mac 编写的,但尝试捕获点击事件并手动设置具有反转颜色的图标...
请将其连接到您的托盘图标的信号
activated()
如果 mac 上的默认行为是将图标颜色反转回来, ,你可以用定时器或类似的东西来做。
I hawen't written for mac but try to catch click event and manually set icon with inverted colors...
connect it to your trayIcon's signal
activated()
if default behavior on mac is to invert icon colors back, you may do it with timer or something similar.