It actually looks like you couldn't do it. According to this manual page you can only set the driver and device for a keyboard handler, but no additional options like keymap. In this arcticle about the keymap thing only the environment variable way ist mentioned, too.
Because of this, the answer here seems to be wrong.
Beware: According to this answer, Qt5 doesn't have QWS and all QWS-related APIs have been removed.