开发者

How to set icon for QtSystemTrayIcon?

开发者 https://www.devze.com 2023-03-15 05:55 出处:网络
I am having a situation using QSystemTrayIcon to set an icon into it. I have a 16x16 icon in png format. With the following code:

I am having a situation using QSystemTrayIcon to set an icon into it. I have a 16x16 icon in png format. With the following code:

m_pTray开发者_运维知识库->setIcon(QIcon (":/res/systemtray.png"));

The icon still not showing up. May I know is it something to do with the path? I have set the full path but still not working.

I am doing it in VS2005. May I know is there a workaround for this?

THanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消