Tried a lot of things, but the problem wasn't in the code. Thank you for your recommendations; they are good ideas regardless of my problem.
The problem was a result of a Linux environment variable QT_XKB_CONFIG_ROOT not being set.
Thank you both, Lesiok and d_stranz!
Bookmarks