QSystemTrayIcon和Windows8 [英] QSystemTrayIcon and Windows8

查看:56
本文介绍了QSystemTrayIcon和Windows8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写应用程序,但托盘类中有奇怪的错误.在我的课堂中,我使用 QSystemTrayIcon 这样的

I writing app and have strange bug in tray class. Inside my class I using QSystemTrayIcon like

 tray = new QSystemTrayIcon(this);
 tray->setIcon(QIcon(":/gui/logo.png"));
 ...
 tray->show();

WinXP Windows7 上正常运行,但是在 Windows 8 图标上未显示

On WinXP and Windows7 it's working properly, but on Windows 8 icon is not displayed

    qDebug()<<"System TRAY:"<< QSystemTrayIcon::isSystemTrayAvailable();// outputs true

我使用Qt5.1.1 MSVC 2012

I use Qt5.1.1 MSVC 2012

推荐答案

我也遇到了同样的问题,我从phyatt使用的解决方案是将 imageformats 文件夹复制到 plugins 我的应用程序的"strong>"文件夹,现在可以正常使用了.

i just had the same problem, the solution i used from phyatt is to copy the imageformats folder to plugins folder of my apps, and it's working fine now.

这篇关于QSystemTrayIcon和Windows8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆