I reworked the file templates for C++. Part of the code in the UI file now differs only in two lines, instead of a separate block for C++. Also UI file looks much better and consistent. Just like for other languages. Screenshots under spoiler.
How UI file look changed
Much of changes I described in comments. Most importantly, now you don’t have to manually add each element in the class constructor. And only those elements that you want to change or use from the code.