title: How to catch keyboard layout change
body: <p>I have several issues:</p>
  
  <ul>
  <li>Catch keyboard layout change event.</li>
  <li>Get current keyboard language.</li>
  <li>Change keyboard layout from my program.</li>
  </ul>
  
  <p>I tried this first:</p>
  
  <pre><code>bool MyWindow::event(QEvent* e)
  {
      if (e-&gt;type() == QEvent::KeyboardLayoutChange)
          qDebug() &lt;&lt; "Keyboard Layout Changed";
  
      return QWidget::event(e);
  }
  </code></pre>
  
  <p>But this type of event is never passed. Also, I have no idea how to solve the other 2 issues.</p>
  
  <p>Could you please show me any workable example on the latest Qt version or some other cross-platform solutions of this problem?</p>
  
  <p>Qt 5.0.2 <br>
  Windows 7 Visual Studio 2012 <br>
  Ubuntu 12.04  G++ 4.7.0</p>