This has been tested on Arch Linux 2017 (Linux Kernel 4.12.12-1-ARCH) with KDE Plasma 5.10 installed, with libreoffice-fresh version 5.4.1.2.0 and other KDE apps.
Install the necessary pacakges:
sudo pacman -S fcitx fcitx-qt4 fcitx-qt5 m17n-db fcitx-m17n fcitx-configtool