This relates to ubuntu 16.04:
When pressing down a key and holding it, keyReleaseEvent sometimes wrongly reports isAutoRepeat as false. This has been reported infrequently by others (
QTBUG-20387, https://forum.qt.io/topic/68803/problem-with-qkeyevent-isautorepeat-function, http://stackoverflow.com/questions/38102221/qkeyevent-isautorepeat-not-working#38122074).
To track it down, I messed with the event-lookahead for keypress in qtbase/src/plugins/platforms/xcb/qxcbkeyboard.cpp:1525. After adding a short usleep, allowing the outstanding generated events to arrive made the problem completely go away:
So maybe it would be helpful to add such a usleep