I have a little problem with the tray icon under the windows. After closing the Qt application (normal exit), the icon still remains in the system panel. It disappears only when I click on it with the mouse cursor. I tried to hide it in the destructor of my window, but it failed: I tried .setVisible(false) .
.setVisible(false)
Any ideas? Thanks.
PS I remember that I had the same problem with SWT / Java.
I would not hide it in the destructor. This will probably be the wrong link at that time. I would place it where your Exit event takes place.
If you cannot call it from the destructor, you can connect the signal QCoreApplication::aboutToQuit() to QSystemTrayIcon::hide() .
QCoreApplication::aboutToQuit()
QSystemTrayIcon::hide()