You are facing the problem most likely because you didn’t set environment variables . Set the envirnment variables, it is very important. All you need to open the file /etc/envirnment and add the following to it, then reboot.
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
When I last checked fcitx5 didn’t work on qt apps. You can check if you can write Japanese in kate or kwrite.