The keyboard widget is casting 16 bit hex value into an 8 bit char, losing the leading byte. The character that appears on the '5' button is currently a 'G' (0x0047). It should actually be a '?' (Capital N with caron - 0x0147):

Qt Code:
  1. // Create keyboard
  2. //
  3. // Note: The hex numbers here are unicode code points, not
  4. // extended ascii or utf-8 encoding.
  5. //
  6. QHBoxLayout* row1 = new QHBoxLayout();
  7. createBtn(row1, 2, '1', '_', '1', '!', static_cast<char>(0xBC));
  8. createBtn(row1, 2, '2', '%', '2', '@', static_cast<char>(0xBD));
  9. createBtn(row1, 2, '3', '&', '3', '?', static_cast<char>(0xBE));
  10. createBtn(row1, 2, '4', '(', '4', static_cast<char>(0xFF), static_cast<char>(0xB0));
  11. createBtn(row1, 2, '5', ')', '5', static_cast<char>(0xDF), static_cast<char>(0x0147));
  12. createBtn(row1, 2, '6', '-', '6', static_cast<char>(0xE0), static_cast<char>(0xC0));
  13. createBtn(row1, 2, '7', ':', '7', static_cast<char>(0xE1), static_cast<char>(0xC1));
  14. createBtn(row1, 2, '8', '/', '8', static_cast<char>(0xE2), static_cast<char>(0xC2));
  15. createBtn(row1, 2, '9', ',', '9', static_cast<char>(0xE3), static_cast<char>(0xC3));
  16. createBtn(row1, 2, '0', '.', '0', static_cast<char>(0xE4), static_cast<char>(0xC4));
  17. createBtn(row1, 3, false, Qt::Key_Backspace, "<---");
To copy to clipboard, switch view to plain text mode 

Has anyone ran into something similar?