qticon only showing on my pc
i made an app in the tray bar with an icon with qt, this is the way i make the icon;
trayIcon->setIcon(QIcon("favicon.ico"));
but it only show the icon on my pc, when i give the project to somebody else its just invisible. even if i do the next thing;
trayIcon->setIcon(QIcon(QDir::currentPath() +开发者_运维知识库 "/favicon.ico"));
does somebody know this problem? / how to solve it? THNX!!!
Are you sure you have deployed the favicon.ico to the other computers? I recommend that you put the favicon.ico file to the resource file. More information about Qt resource system.
If you want to keep the icon as a separate file, you could try to change QDir::currentPath() to QApplication::applicationDirPath(). The current path might not be the application path in those other computers.
精彩评论