QKeyEvent::text() doesn't return accent letter on Linux
-
Does anyone know why QKeyEvent::text() for typing ` + a returns one empty string and one letter a instead of one empty string and the letter à on Linux? Under Windows this seems to be working fine (same application running under Windows and Linux).
I'm handling the pressed keys via this class.
-
@dporobic
you might see the internals described here:
https://www.kdab.com/a-little-hidden-gem-qstringiterator/How did you check the contents of the string exactly? Did you inspect the actual bytecode?
-
@raven-worx I wrote it to console. The solution seems to be using inputMethod for those composed letters as suggested here on SO https://stackoverflow.com/questions/60020662/qkeyeventtext-doesnt-return-accent-letter-on-linux
-
Keep in mind that how multi-national characters are decoded in linux is dependent upon the settings of the terminal program you are viewing them in. Are the locale environment variables set correctly? Have you installed an appropriate font into linux?