Qt5 programming model is that C++ Widgets are legacy and you are supposed to do the UI in QML, a JavaScript dialect, while coding in C++ the business logic or the hardware interaction of new widgets you might create.
Uh. I've used JavaScript in a production environment, and I really really don't like it. It feels like a massive step backwards to me, when there's so many good languages out there. I wish developers would stop pushing for JavaScript everywhere.
Having to use it in the browser is horrible enough. Please don't write servers and other back-end code as well in it now. I personally wouldn't even use it for web front-end--- I would rather use a language like Elm, that cleanly compiles to JavaScript.
Both C++ and Java have been improving their syntax in recent years. I'd recommend reintroducing yourself to the latest version of either.
Second, there are experimental modules systems available that avoid many of the disadvantages of header-only code. If things go well, modules will be standard in C++20.
There are certainly things I would improve about the syntax of Java and C++, but both are improving quickly in that regard.