Try running the manual test in qtbase/src/tests/manual/xembed-widgets/gtk-embedder.py: you'll see that even if the Qt window is properly embedded and gets keyboad events once you click on it, visually the focus is not indicated (it appears as if all the widgets are still unfocused).
I traced this down to commit a096b4680dca367ec26725d064eba1df6c37d6b7.
I have a fix ready, I'll update this bug with the link soon.
|For Gerrit Dashboard: QTBUG-37984|
|82253,4||When looking up the window hierarchy, stop at foreign windows||stable||qt/qtbase||Status: MERGED||+2||0|