QSystemTrayIcon doesn't work at another computer

88 Views Asked by At

I have a problem with QSystemTrayIcon. I've built the application on two different computers. I've built in the first computer and launch the application on the another and vice versa. The problem is that I don't see any icon in the tray menu, but the process is running (if I launch the application on the computer on which it was built, everything works fine). I've googled a lot and stuck with this issue.

Icon located near the executable file. Also, I have the folder imageformats with qico.dll but nothing changed.

    QApplication a(argc, argv);
    a.addLibraryPath(app.applicationDirPath());

    auto trayIcon = std::make_shared<QSystemTrayIcon>(":/icon.ico");
    Handler handler(trayIcon);

    trayIcon->setVisible(true);
    trayIcon->setToolTip("tooltip");
1

There are 1 best solutions below

0
On

Soooo, the problem was in the .ico format of the application image. When I changed it to the icon with the .png extension, it works fine.