title: How to handle session change notifications in Qt tray application?
body: <p>I have a problem with handling session state notifications (like user logon/logoff/lock etc) in Qt tray application. In usual Qt application I can call <code>WTSRegisterSessionNotification</code> with <code>hWnd=effectiveWinId()</code> and re-implement <code>nativeEvent</code> like this:</p>
  
  <pre><code>bool EventListener::nativeEvent(const QByteArray &amp;eventType, void *message, long *result)
  {    
      MSG* msg = reinterpret_cast&lt;MSG*&gt;(message);
      switch(msg-&gt;message)
      {
          case WM_WTSSESSION_CHANGE:
              ...
      }
  
      ...
  }
  </code></pre>
  
  <p>But in tray application it's impossible, because <code>QSystemTrayIcon</code> doesn't inherits from <code>QWidget</code> and I haven't any window handle.</p>
  
  <p>Is it possible to resolve the problem without creating fake invisible window?</p>