Constructs a key event object.
The type parameter must be QEvent::KeyPress, QEvent::KeyRelease, or QEvent::ShortcutOverride.
If key is 0, the event is not a result of a known key; for example, it may be the result of a compose sequence or keyboard macro. The modifiers holds the keyboard modifiers, and the given text is the Unicode text that the key generated. If autorep is true, isAutoRepeat() will be true. count is the number of keys involved in the event.