Qt Virtual Keyboard Doesn't Know Which Item Is Focused
-
I'm developing a touch screen application with static build Qt 5.12.3. It runs on an Ubuntu OS replacing the desktop daemon(started by xinit).
Earlier the virtual keyboard works fine, because I didn't build Qt with xinput . Now I need to enable multi-touch support so I rebuilt the Qt with '-xcb-xinput' option. The multi-touch works, however the VKB stopped working. No matter how I make the TextEdit/TextArea focus, the virtual keyboard (VKB) doesn't know which item is focused. Every time I press a key, I get 'no input method is set' warning. The text boxes actually have focus, I know this because if I type with a actual keyboard, the key got registered with no problem. Weird thing is, if I start the application inside a Ubuntu's desktop daemon-lightdm, this issue does not exist anymore.
I have been working on this issue for several days, today I found out more about this issue. If I click the text box or the VKB with a physical mouse, then the VKB start to know which item has the focus, then it will function normally until I restart the application. It has to be a physical mouse clicked, a click/press on the touch screen does not do the trick.
Could anyone help please?
Thanks