You're right there, I should have used a Python on the CLI side as the example. Bash was a poor choice as it doesn't work with all of the points in one example. GUIs also vary on their out of the box compatibility, QT5 to QT6 is similar to Python in that that doesn't (without some work) just work though.
The lessons from (Qt3 to Qt4 and) Qt4 to Qt5 have been learned and moving a large project from Qt5 to Qt6 is not that hard comparatively. There are a few minor deprecated APIs to handle and it's relatively easy over all.
I even have a stable project that is compatible with Qt5 and Qt6 [1] all in a single code base (particularly thanks to the effort of the qtpy[2] library). It's not that hard, and my opinion includes C++ in that assessment.