In my case, I specified QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx
in the environment variable and can now type.
I want you to try one of the following.
Console
QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx krita
GUI
See also: KDE 環境で一部の Qt 系アプリケーションで日本語入力ができない #Linux - Qiita
(This posts was written in Japanese, so you should use translator app such as Google Translator or DeepL)
(I think the problem was caused by Wayland, but I don’t know details)