title: How can I capture QKeySequence from QKeyEvent depending on current keyboard layout?
body: <p>I need to do this for configuring my application.
  I have QLineEdit field with reimplemented keyPressEvent method.</p>
  
  <pre><code>QKeyEvent *ke = ...
  QString txt;
  
  if(ke-&gt;modifiers() &amp; Qt::ControlModifier)
      txt += "Ctrl+";
  if(ke-&gt;modifiers() &amp; Qt::AltModifier)
      txt += "Alt+";
  if(ke-&gt;modifiers() &amp; Qt::ShiftModifier)
      txt += "Shift+";
  
  if(ke-&gt;key() &gt;= Qt::Key_0 &amp;&amp; ke-&gt;key() &lt;= Qt::Key_9)
      txt += ('0' + ke-&gt;key() - Qt::Key_0);
  else if(ke-&gt;key() &gt;= Qt::Key_A &amp;&amp; ke-&gt;key() &lt;= Qt::Key_Z)
      txt += ('A' + ke-&gt;key() - Qt::Key_A);
  ui-&gt;hotkeyEdit-&gt;setText(txt);
  </code></pre>
  
  <p>But this solution can create shortcuts only with english chars. For example when I use russian keyboard layout, this code will display the same sequence but with english char, placed on the same keyboard key.</p>