Hello, I want to achieve something like this: I have a tray icon and when I click it I want it to toggle the visibility of my main window. That sounds easy to achieve, but there's one problem, when my window is behind another application's window it is still considered visible so clicking tray icon hides it and i have to double click to make it visible. This isn't a big deal but can be annoying, is there a function in Qt to know is a window covered by another window? Using QWidget::activeWindow() always returns false because when I click the tray icon the window looses focus and is not active.