Edit ui files with CLion
You can go to Settings -> Editor -> File Types and choose XML to add *.ui files below.
What you can also do is register an external tool to edit the UI files with the Qt UI Designer: https://www.jetbrains.com/help/clion/external-tools.html